def test_who_wins_returns_bot_wins_if_player_gives_scissors_and_bot_gives_rock(
):
    assert who_wins(player="scissors", bot="rock") == "bot wins"
def test_who_wins_returns_player_wins_if_player_gives_scissors_and_bot_gives_paper(
):
    assert who_wins(player="scissors", bot="paper") == "player wins"
def test_who_wins_returns_bot_wins_if_player_gives_rock_and_bot_gives_paper():
    assert who_wins(player="rock", bot="paper") == "bot wins"
def test_who_wins_returns_player_wins_if_player_gives_rock_and_bot_gives_scissors(
):
    assert who_wins(player="rock", bot="scissors") == "player wins"
def test_who_wins_returns_draw_if_both_players_play_the_same():
    assert who_wins(player="paper", bot="paper") == "its a draw"
Ejemplo n.º 6
0
from game import who_wins
import random

options = ["scissors", "rock", "paper"]

print("choose rock, paper or scissors")

player_input = input()
bot_input = random.choice(options)

print(bot_input)
print(who_wins(player_input, bot_input))