Bridges-Python  3.4.4
Bridges(Python API)
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
bridges.gamebase3D.GameBase3D Class Reference
Inheritance diagram for bridges.gamebase3D.GameBase3D:
bridges.non_blocking_game3D.NonBlockingGame3D

Detailed Description

This is the base class for all games in BRIDGES.

Author
David Burlinson, Erik Saule
Date
2020, 2021

Public Member Functions

def __init__ (self, assid, login, apikey)
 PROTECTED constructor prevents the object from being directly created. More...
 
def game_base_init (self, id, log, key)
 Initializes the gamebase object. More...
 
def close (self)
 close the socket connection (and game) More...
 
def register_keypress (self, kl)
 
def start (self)
 
def initialize (self)
 
def game_loop (self)
 
def quit (self)
 calling this function causes the game to end. More...
 
def set_title (self, title)
 sets title of game More...
 
def set_description (self, desc)
 sets description of the game More...
 
def render (self)
 renders the scene More...
 

Public Attributes

 firsttime
 
 bridges
 
 sock
 
 scene
 
 game_started
 

Static Public Attributes

bool debug = True
 

Constructor & Destructor Documentation

◆ __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
assidassignment number
loginuser name
apikeyauthentication id
rowsheight of game grid
colswidth of game grid
Returns
None

Reimplemented in bridges.non_blocking_game3D.NonBlockingGame3D.

Member Function Documentation

◆ 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
idassignment number
loguser name
keyauthentication id
rowsheight of game grid
colswidth 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)

renders the scene

◆ 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)
"starts the game. Called once at the beginning"

Reimplemented in bridges.non_blocking_game3D.NonBlockingGame3D.

Member Data Documentation

◆ 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: