Package g54327.humbug.model.Structures
Class Board
- java.lang.Object
-
- g54327.humbug.model.Structures.Board
-
public class Board extends Object
Board class- Since:
- 0.1.0
- Version:
- 1.1.1
- Author:
- Andrew SASSOYE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNbColumn()
this.nbColumn getterint
getNbRow()
this.nbRow getterSquare
getSquare(Position position)
get a Square at a given positionSquare[][]
getSquares()
this.squares getterSquareType
getSquareType(Position position)
get a SquareType at a given positionboolean
isInside(Position position)
Verify if a Square is present at given positionBoard
setSquareType(Position position, SquareType squareType)
Set the SquareType at a given position
-
-
-
Constructor Detail
-
Board
public Board()
Board constructor
-
Board
public Board(Square[][] squares)
Board constructor- Parameters:
squares
- Squares in Board
-
-
Method Detail
-
isInside
public boolean isInside(Position position)
Verify if a Square is present at given position- Parameters:
position
- Position to verify- Returns:
- true if present, false if not
-
getSquareType
public SquareType getSquareType(Position position)
get a SquareType at a given position- Parameters:
position
- Position to get SquareType- Returns:
- SquareType at position
-
getSquares
public Square[][] getSquares()
this.squares getter- Returns:
- this.squares
-
getSquare
public Square getSquare(Position position)
get a Square at a given position- Parameters:
position
- Position to get Square- Returns:
- Square at position
- Since:
- 1.1.0
-
setSquareType
public Board setSquareType(Position position, SquareType squareType)
Set the SquareType at a given position- Parameters:
position
- Position to modify SquareTypesquareType
- new SquareType- Returns:
- Board
-
getNbRow
public int getNbRow()
this.nbRow getter- Returns:
- this.nbRow
-
getNbColumn
public int getNbColumn()
this.nbColumn getter- Returns:
- this.nbColumn
-
-