All Packages Class Hierarchy This Package Previous Next Index
Class scrobble.BoardShape
java.lang.Object
|
+----scrobble.BoardShape
- public class BoardShape
- extends Object
- implements Serializable
The BoardShape
code is used to configure the Board
objects created in the game. It contains the board dimensions, the default
square object, and a list of special squares.
-
defaultSquareClass
- Default Square
-
height
- Height of the Board
-
squareList
- List of SquarePositioners containing the square and the position of the square on the board
-
width
- Width of the Board
-
BoardShape(int, int, Square, Vector)
- Creates a new BoardShape with the given height,width,defaultSquare and squareList
-
getDefaultSquare()
- Returns the defaultSquare of the BoardShape
-
getHeight()
- Returns the height of the BoardShape
-
getSquareList()
- Returns the squareList of the BoardShape
-
getWidth()
- Returns the width of the BoardShape
-
setDefaultSquare(Square)
- Modifies the defaultSquare of the BoardShape
-
setHeight(int)
- Modifies the height of the BoardShape
-
setSquareList(Vector)
- Modifies the squareList of the BoardShape
-
setWidth(int)
- Modifies the width of the BoardShape
height
int height
- Height of the Board
width
int width
- Width of the Board
defaultSquareClass
Class defaultSquareClass
- Default Square
squareList
Vector squareList
- List of SquarePositioners containing the square and the position of the square on the board
BoardShape
public BoardShape(int height,
int width,
Square defaultSquare,
Vector squareList)
- Creates a new BoardShape with the given height,width,defaultSquare and squareList
- Parameters:
- height - the height of the new BoardShape being created
- width - the width of the new BoardShape
- defaultSquare - the defaultSquare of the new BoardShape
- squareList - the squareList of the new BoardShape
setHeight
public void setHeight(int newHeight)
- Modifies the height of the BoardShape
- Parameters:
- newHeight - the new height of the BoardShape
getHeight
public int getHeight()
- Returns the height of the BoardShape
- Returns:
- the height
setWidth
public void setWidth(int newWidth)
- Modifies the width of the BoardShape
- Parameters:
- newWidth - the new width of the BoardShape
getWidth
public int getWidth()
- Returns the width of the BoardShape
- Returns:
- the width
setDefaultSquare
public void setDefaultSquare(Square newDefaultSquare)
- Modifies the defaultSquare of the BoardShape
- Parameters:
- newDefaultSquare - the new defaultSquare of the BoardShape
getDefaultSquare
public Square getDefaultSquare()
- Returns the defaultSquare of the BoardShape
- Returns:
- the defaultSquare
setSquareList
public void setSquareList(Vector newSquareList)
- Modifies the squareList of the BoardShape
- Parameters:
- newSquareList - the new squareList of the BoardShape
getSquareList
public Vector getSquareList()
- Returns the squareList of the BoardShape
- Returns:
- the squareList
All Packages Class Hierarchy This Package Previous Next Index