Example #1
0
	def startGame(self):
		playerNumber = input("'one' player or 'two' players?\n")
		
		#pull this out
		if playerNumber == "two":
			player1 = Human()
			player2 = Human()
		elif playerNumber == "one":
			player1 = Human()
			player2 = AI()
		####

	
		match = Match()


		while match.matchNumber < 3:
			match.countMatches()
			match.startMatch(player1, player2)

			if player1.wins >= 2 or match.matchNumber == 3 and player1.wins > player2.wins:
				self.winner = "Player 1!"
				break
			elif player2.wins >= 2 or match.matchNumber == 3 and player2.wins > player1.wins:
				self.winner = "Player 2!"
				break