Bridges-Python 3.5.1
Bridges(Python API)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
bridges.blocking_game.BlockingGame Class Reference
Inheritance diagram for bridges.blocking_game.BlockingGame:
bridges.keypress_listener.KeyPressListener bridges.gamebase.GameBase

Public Member Functions

 __init__ (self, assid, login, apikey, cols, rows)
 PROTECTED constructor prevents the object from being directly created.
 
 blocking_init (self)
 
 key_press (self, keypress)
 
 get_keypress (self)
 
 start (self)
 
- Public Member Functions inherited from bridges.gamebase.GameBase
 game_base_init (self, id, log, key, rows, cols, debug=False)
 Initializes the gamebase object.
 
 close (self)
 close the socket connection (and game)
 
 register_keypress (self, kl)
 
 initialize (self)
 
 game_loop (self)
 
 quit (self)
 calling this function causes the game to end.
 
 set_title (self, title)
 sets title of game
 
 set_description (self, desc)
 sets description of the game
 
 get_bg_color (self, row, col)
 gets background color of a cell
 
 set_bg_color (self, row, col, color)
 sets background color of a cell
 
 get_symbol (self, row, col)
 gets symbol of the cell at row, col
 
 get_symbol_color (self, row, col)
 gets symbol color of the cell at row, col
 
 draw_symbol (self, row, col, s, c)
 draw symbol s with color col at cell (row, col)
 
 render (self)
 renders the board
 

Public Attributes

 q
 
- Public Attributes inherited from bridges.gamebase.GameBase
 grid_state
 
 debug
 
 firsttime
 
 bridges
 
 grid
 
 sock
 
 game_started
 

Additional Inherited Members

- Static Public Attributes inherited from bridges.gamebase.GameBase
bool debug = True
 
- Properties inherited from bridges.gamebase.GameBase
 board_width = property
 setter/getter property for board width
 
 board_height = property
 setter/getter property for board height
 

Constructor & Destructor Documentation

◆ __init__()

bridges.blocking_game.BlockingGame.__init__ (   self,
  assid,
  login,
  apikey,
  rows,
  cols 
)

PROTECTED constructor prevents the object from being directly created.

Since GameBase is meant to be a purely internal class, that seems appropriate.

Parameters
assidassignment number
loginuser name
apikeyauthentication id
rowsheight of game grid
colswidth of game grid
Returns
None

Reimplemented from bridges.gamebase.GameBase.

Member Function Documentation

◆ blocking_init()

bridges.blocking_game.BlockingGame.blocking_init (   self)

◆ get_keypress()

bridges.blocking_game.BlockingGame.get_keypress (   self)

◆ key_press()

bridges.blocking_game.BlockingGame.key_press (   self,
  keypress 
)

◆ start()

bridges.blocking_game.BlockingGame.start (   self)
"starts the game. Called once at the beginning"

Reimplemented from bridges.gamebase.GameBase.

Member Data Documentation

◆ q

bridges.blocking_game.BlockingGame.q

The documentation for this class was generated from the following file: