Back to index

gcompris  8.2.2
Public Member Functions | Public Attributes
connect4p.board.Board Class Reference

4st Attack 2 # More...

List of all members.

Public Member Functions

def __init__
def move
def domoves
def undomove

Public Attributes

 state
 last_move

Detailed Description

4st Attack 2 #

Created by: # Developer - "slm" - Jeroen Vloothuis # Graphics - "Korruptor" - Gareth Noyce # Music - "theGREENzebra" #

Specail thanks: # chakie(Jan Elkholm) - letting me "embrace and extend" his gui lib # Mighty(Xander Soldaat) - for the Makefile and the Debian packages # Han - for the rpms # jk - for the FreeBSD port # Tjerk Nan - for the Windows version # Micon - for the webdesign # Everyone in #pygame and the opensource community in general #

This software is licensed under the GPL - General Public License #

Definition at line 47 of file board.py.


Constructor & Destructor Documentation

Definition at line 49 of file board.py.

00049 
00050   def __init__(self):
00051     self.state = []
00052     for x in range(7):
00053       self.state.append([])
00054     self.last_move = -1
  

Member Function Documentation

def connect4p.board.Board.domoves (   self,
  moves 
)

Definition at line 59 of file board.py.

00059 
00060   def domoves(self, moves):
00061     for (move, player) in moves:
00062       self.move(move, player)
      

Here is the call graph for this function:

def connect4p.board.Board.move (   self,
  move,
  player 
)

Definition at line 55 of file board.py.

00055 
00056   def move(self, move, player):
00057     self.state[move].append(player)
00058     self.last_move = move
  

Here is the caller graph for this function:

def connect4p.board.Board.undomove (   self,
  move 
)

Definition at line 63 of file board.py.

00063 
00064   def undomove(self, move):
00065     if len(self.state[move]) > 0:
00066       del self.state[move][len(self.state[move])-1]

Member Data Documentation

Definition at line 53 of file board.py.

Definition at line 50 of file board.py.


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