~evigo-deactivatedaccount/pyctactoe/trunk

« back to all changes in this revision

Viewing changes to pttgames/tictactoe/tictactoe.py

  • Committer: Eugenio M. Vigo
  • Date: 2010-09-11 11:10:17 UTC
  • Revision ID: emvigo@gmail.com-20100911111017-krkww80qa8mzkkt8
Fixed stuff... again... Made checking methods static

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
            # Now checking the result of the last play. The game's interrupted
41
41
            # if there's a winner or a tie.
42
 
            board_check = self.check(self.board)
 
42
            board_check = PTTGame_tictactoe.check(self.board)
43
43
 
44
44
            if board_check in self.board.players:
45
45
                curses_ui.notify("\n" + board_check.mark + " wins!")
114
114
 
115
115
        return status
116
116
 
117
 
    def check(self, board):
 
117
    @staticmethod
 
118
    def check(board):
118
119
        """Checks the game board according to the rules of Tictactoe. Takes any
119
120
        Board object as 'board'. Returns the winning player's instance, 'tie' in
120
121
        case of tie or None in case the status is not final."""