Beispiel #1
0
	def teststuff(self):
		p = Game()
		p.addSquare(0)
		p.addSquare(4)
		p.addSquare(1)
		p.addSquare(6)
		p.addSquare(2)
		self.assertEquals(p.gameWin(1),True)	#player wins
		self.assertEquals(p.addSquare(3),False)	#the game is over - you can't add more!
Beispiel #2
0
	def testmakeGame(self):		
		p = Game()
		self.assertEquals(p.turn,1)
		p.addSquare(1)
		self.assertEquals(p.turn,2)	#game has changed turn
		self.assertEquals(p.addSquare(1),False)	#insure you cannot add to an already used square