3
# Copyright (C) 2005, 2008 Laurent Lacheny
5
# This program is free software; you can redistribute it and/or modify
6
# it under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3 of the License, or
8
# (at your option) any later version.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, see <http://www.gnu.org/licenses/>.
19
# This code comes from the project 4stattack
20
# http://forcedattack.sourceforge.net/
22
#########################################################################
24
#########################################################################
26
# Developer - "slm" - Jeroen Vloothuis #
27
# Graphics - "Korruptor" - Gareth Noyce #
28
# Music - "theGREENzebra" #
29
#########################################################################
31
# chakie(Jan Elkholm) - letting me "embrace and extend" his gui lib #
32
# Mighty(Xander Soldaat) - for the Makefile and the Debian packages #
33
# Han - for the rpms #
34
# jk - for the FreeBSD port #
35
# Tjerk Nan - for the Windows version #
36
# Micon - for the webdesign #
37
# Everyone in #pygame and the opensource community in general #
38
#########################################################################
39
# This software is licensed under the GPL - General Public License #
40
#########################################################################
45
# Setup an empty board
52
def move(self, move, player):
53
self.state[move].append(player)
56
def domoves(self, moves):
57
for (move, player) in moves:
58
self.move(move, player)
60
def undomove(self, move):
61
if len(self.state[move]) > 0:
62
del self.state[move][len(self.state[move])-1]