|
Methods defined here:
- __init__(self, size)
- Create a board of the given size (size x size).
The board will have an initial value of all '-'.
- __str__(self)
- Return the text representation of the game board.
- close(self)
- Close the board and destroy the display window
- findNextDash(self) -> tuple
- Return the location of the next "-" as a tuple, (row,col)
If no dash is found, return (-1, -1)
- getColorAt(self, row: int, col: int)
- return the color value at the given location
- setAllColors(self, textBoard: list)
- Given board indicating the state of the game and
set set the colors on the board appropriately.
The board is a list of list of strings.
Each string is either 'B', 'W' or '-'
- setColorAt(self, row: int, col: int, color: str)
- Set the color at row col to be color
Color should be one of 'B', 'W' or '-'
- updatingGraphics(self, value: bool)
- Set the toggle to whichver they choose.
When this is true, which is the default, each change is displayed.
When this is false, it will not update the display.
When is called to set the value is to True, the board display is refreshed immediately.
- validColor(self, color: str) -> bool
- This is an error checking method to make sure the color is valid.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|