Back to index

gcompris  8.2.2
Public Member Functions | Public Attributes | Static Public Attributes
connect4p.human.Human Class Reference

List of all members.

Public Member Functions

def __init__
def doMove
def setmove
def gameOver
def setDifficulty

Public Attributes

 board
 move

Static Public Attributes

string type = 'human'

Detailed Description

Definition at line 48 of file human.py.


Constructor & Destructor Documentation

def connect4p.human.Human.__init__ (   self,
  difficulty 
)

Definition at line 51 of file human.py.

00051 
00052   def __init__(self, difficulty):
00053     pass


Member Function Documentation

def connect4p.human.Human.doMove (   self,
  board,
  player,
  event 
)

Definition at line 55 of file human.py.

00055 
00056   def doMove(self, board, player, event):
00057     self.board = board
00058     if event >-1 and event < 7:
00059       return event
00060     return -1

def connect4p.human.Human.gameOver (   self,
  move 
)

Definition at line 65 of file human.py.

00065 
00066   def gameOver(self, move):
00067     return None

def connect4p.human.Human.setDifficulty (   self,
  difficulty 
)

Definition at line 68 of file human.py.

00068 
00069   def setDifficulty(self, difficulty):
00070     pass
def connect4p.human.Human.setmove (   self,
  trigger,
  event,
  number 
)

Definition at line 61 of file human.py.

00061 
00062   def setmove(self, trigger, event, number):
00063     if rules.isMoveLegal(self.board, number):
00064       self.move = number
      return widget.DONE

Member Data Documentation

Definition at line 56 of file human.py.

Definition at line 63 of file human.py.

string connect4p.human.Human.type = 'human' [static]

Definition at line 49 of file human.py.


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