This is the base class for all games in BRIDGES.
More...
This is the base class for all games in BRIDGES.
- Author
- David Burlinson, Erik Saule
- Date
- 2020, 2021
◆ __init__()
def bridges.gamebase3D.GameBase3D.__init__ |
( |
|
self, |
|
|
|
assid, |
|
|
|
login, |
|
|
|
apikey |
|
) |
| |
PROTECTED constructor prevents the object from being directly created.
Since GameBase is meant to be a purely internal class, that seems appropriate.
- Parameters
-
assid | assignment number |
login | user name |
apikey | authentication id |
rows | height of game grid |
cols | width of game grid |
- Returns
-
None
Reimplemented in bridges.non_blocking_game3D.NonBlockingGame3D.
◆ close()
def bridges.gamebase3D.GameBase3D.close |
( |
|
self | ) |
|
close the socket connection (and game)
◆ game_base_init()
def bridges.gamebase3D.GameBase3D.game_base_init |
( |
|
self, |
|
|
|
id, |
|
|
|
log, |
|
|
|
key |
|
) |
| |
Initializes the gamebase object.
- Parameters
-
id | assignment number |
log | user name |
key | authentication id |
rows | height of game grid |
cols | width of game grid |
◆ game_loop()
def bridges.gamebase3D.GameBase3D.game_loop |
( |
|
self | ) |
|
"Method contains all of the game logica and can call other user defined methods"
◆ initialize()
def bridges.gamebase3D.GameBase3D.initialize |
( |
|
self | ) |
|
"Game initialization. . Called once at the beginning"
◆ quit()
def bridges.gamebase3D.GameBase3D.quit |
( |
|
self | ) |
|
calling this function causes the game to end.
- Returns
-
None
◆ register_keypress()
def bridges.gamebase3D.GameBase3D.register_keypress |
( |
|
self, |
|
|
|
kl |
|
) |
| |
◆ render()
def bridges.gamebase3D.GameBase3D.render |
( |
|
self | ) |
|
◆ set_description()
def bridges.gamebase3D.GameBase3D.set_description |
( |
|
self, |
|
|
|
desc |
|
) |
| |
sets description of the game
- Returns
-
None
◆ set_title()
def bridges.gamebase3D.GameBase3D.set_title |
( |
|
self, |
|
|
|
title |
|
) |
| |
sets title of game
- Returns
-
None
◆ start()
def bridges.gamebase3D.GameBase3D.start |
( |
|
self | ) |
|
◆ bridges
bridges.gamebase3D.GameBase3D.bridges |
◆ debug
bool bridges.gamebase3D.GameBase3D.debug = True |
|
static |
◆ firsttime
bridges.gamebase3D.GameBase3D.firsttime |
◆ game_started
bridges.gamebase3D.GameBase3D.game_started |
◆ scene
bridges.gamebase3D.GameBase3D.scene |
◆ sock
bridges.gamebase3D.GameBase3D.sock |
The documentation for this class was generated from the following file: