Lines Matching refs:board
6 An empty board will be displayed, and the following commands are available:
7 E : Erase the board
8 R : Fill the board randomly
12 Cursor keys : Move the cursor around the board
23 """Encapsulates a Life board
26 X,Y : horizontal and vertical size of the board
32 of the board and refresh the screen.
33 erase() -- clear the entire board
34 make_random() -- fill the board randomly
53 # Draw a border around the board
85 """Clear the entire board and update the board display"""
90 """Display the whole board, optionally computing one generation"""
136 "Fill the board with a random pattern"
162 'E)rase the board, R)andom fill, S)tep once or C)ontinuously, Q)uit')
186 # Allocate a subwindow for the Life board and create the board object
188 board = LifeBoard(subwin, char=ord('*'))
189 board.display(update_board=False)
192 xpos, ypos = board.X // 2, board.Y // 2
201 board.toggle(ypos, xpos)
216 board.display()
224 board.erase()
228 board.make_random()
229 board.display(update_board=False)
231 board.display()
237 elif c == curses.KEY_DOWN and ypos + 1 < board.Y:
241 elif c == curses.KEY_RIGHT and xpos + 1 < board.X:
245 if (mouse_x > 0 and mouse_x < board.X + 1 and
246 mouse_y > 0 and mouse_y < board.Y + 1):
249 board.toggle(ypos, xpos)
251 # They've clicked outside the board