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.


Variable Index

 o defaultSquareClass
Default Square
 o height
Height of the Board
 o squareList
List of SquarePositioners containing the square and the position of the square on the board
 o width
Width of the Board

Constructor Index

 o BoardShape(int, int, Square, Vector)
Creates a new BoardShape with the given height,width,defaultSquare and squareList

Method Index

 o getDefaultSquare()
Returns the defaultSquare of the BoardShape
 o getHeight()
Returns the height of the BoardShape
 o getSquareList()
Returns the squareList of the BoardShape
 o getWidth()
Returns the width of the BoardShape
 o setDefaultSquare(Square)
Modifies the defaultSquare of the BoardShape
 o setHeight(int)
Modifies the height of the BoardShape
 o setSquareList(Vector)
Modifies the squareList of the BoardShape
 o setWidth(int)
Modifies the width of the BoardShape

Variables

 o height
 int height
Height of the Board

 o width
 int width
Width of the Board

 o defaultSquareClass
 Class defaultSquareClass
Default Square

 o squareList
 Vector squareList
List of SquarePositioners containing the square and the position of the square on the board

Constructors

 o 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

Methods

 o setHeight
 public void setHeight(int newHeight)
Modifies the height of the BoardShape

Parameters:
newHeight - the new height of the BoardShape
 o getHeight
 public int getHeight()
Returns the height of the BoardShape

Returns:
the height
 o setWidth
 public void setWidth(int newWidth)
Modifies the width of the BoardShape

Parameters:
newWidth - the new width of the BoardShape
 o getWidth
 public int getWidth()
Returns the width of the BoardShape

Returns:
the width
 o setDefaultSquare
 public void setDefaultSquare(Square newDefaultSquare)
Modifies the defaultSquare of the BoardShape

Parameters:
newDefaultSquare - the new defaultSquare of the BoardShape
 o getDefaultSquare
 public Square getDefaultSquare()
Returns the defaultSquare of the BoardShape

Returns:
the defaultSquare
 o setSquareList
 public void setSquareList(Vector newSquareList)
Modifies the squareList of the BoardShape

Parameters:
newSquareList - the new squareList of the BoardShape
 o getSquareList
 public Vector getSquareList()
Returns the squareList of the BoardShape

Returns:
the squareList

All Packages  Class Hierarchy  This Package  Previous  Next  Index