Ejemplo n.º 1
0
	def display_graphics(self, guesses):
		"""Display the graphics of the hangman"""
		if self.guesses == 0:
			return HangmanGraphics.zero()
		elif self.guesses == 1:
			return HangmanGraphics.one()
		elif self.guesses == 2:
			return HangmanGraphics.two()
		elif self.guesses == 3:
			return HangmanGraphics.three()
		elif self.guesses == 4:
			return HangmanGraphics.four()
		elif self.guesses == 5:
			return HangmanGraphics.five()
		elif self.guesses == 6:
			return HangmanGraphics.six()
		elif self.guesses == 7:
			return HangmanGraphics.seven()
		elif self.guesses == 8:
			return HangmanGraphics.eight()
Ejemplo n.º 2
0
	def round(self):
		"""Create a round of the game"""
		while self.guesses < 8:
			self.play()
		else:
			return self.game_over_lose(self.secret_word, HangmanGraphics.eight())