| |
Methods defined here:
- __init__(self, width, height)
- Creates and draws a grid with a specified width and height.
The grid will be a square and beneath it will be a small area
reserved for the score. If necessary, the grid will be
centered left-to-right. If necessary, extra space on the
bottom will be unused.
- __str__(self)
- Return a string representation of the grid.
- draw(self, window)
- Draw the grid in the GraphWin window.
- getCellLocation(self, row, col)
- Returns the Point at the top left corner of the cell at (row,
col). If (row, col) are not both between 0 and 3, returns None.
- getTileSize(self)
- Return the size the spaces on the grid that the tiles will fit
into. Since Tiles are square, the return value is the length of
one side of the Tile.
- setScore(self, score)
- Set the score to be displayed on the grid.
|