Updated version to 0.0.7.
[troncode.git] / AbstractGameBoard.py
blob39d7169558df86bdea77f16c67164b6f6098ba3b
2 class AbstractGameBoard( object ):
3 def __init__( self, gamestate ):
4 pass
6 def GetRelativePixel( self, start_pos, facing_dir,
7 offset_fwd, offset_right ):
8 """Given a position to stand in the arena, and a direction to face,
9 return the status (0 for empty, >0 for non-empty) of a pixel that
10 is offset_fwd pixels in front, and offset_right pixels to the right
11 (negative values may be used to go backwards or left respectively).
12 Pixels outside the arena also return >0."""
13 pass
15 def GetAbsolutePixel( self, (x, y) ):
16 """Return 0 if the absolute position specified does not contain
17 a pixel, and >0 if it does. Pixels outside the arena also
18 return >0."""
19 pass
21 def GetArenaSize( self ):
22 """Return the size of the arena as a tuple (width, height)."""
23 pass
25 def GetPlayerPositions( self, pos_to_exclude = None ):
26 """Returns a list of pairs (pos, dir) for each player on screen.
27 Excludes the player at the position specified if pos_to_exclude
28 is not None."""
29 pass
31 def TurnRight( self, direction ):
32 """Return the direction found by turning 90 degrees right from
33 the supplied direction."""
34 pass
36 def TurnLeft( self, direction ):
37 """Return the direction found by turning 90 degrees left from
38 the supplied direction."""
39 pass