def test_match_human(): #human vs computer u = users.sign_in() p1 = players.Human(user=u) p2 = players.Computer(difficulty='hard') g = games.Cribbage(p1, p2) g.game_driver()
def test_turncard_sequence(): print(f'\n-------- Test Turncard Sequence ----------\n') #computer vs computer p1 = players.Computer(difficulty='medium') p2 = players.Computer(difficulty='medium') g = games.Cribbage(p1, p2) g.deck.shuffle() g.determine_dealer_sequence() g.turncard_sequence()
def test_determine_dealer_sequence(): print(f'\n-------- Test Determine Dealer Sequence ----------\n') #computer vs computer p1 = players.Computer(difficulty='medium') p2 = players.Computer(difficulty='medium') g = games.Cribbage(p1, p2) g.deck.shuffle() g.determine_dealer_sequence() print(f'\n-- Is {g.player_one.name} Dealer? {g.player_one.is_dealer}') print(f'\n-- Is {g.player_two.name} Dealer? {g.player_two.is_dealer}')
def test_deal_sequence(): print(f'\n-------- Test Deal Sequence ----------\n') #computer vs computer p1 = players.Computer(difficulty='medium') p2 = players.Computer(difficulty='medium') g = games.Cribbage(p1, p2) g.deck.shuffle() g.determine_dealer_sequence() g.deal_sequence() print(f'-- {g.player_one.name} hand:') g.player_one.display_hand() print(f'-- {g.player_two.name} hand:') g.player_two.display_hand()
def test_discard_sequence(): print(f'\n-------- Test Discard Sequence ----------\n') #computer vs computer p1 = players.Computer(difficulty='medium') p2 = players.Computer(difficulty='medium') g = games.Cribbage(p1, p2) g.deck.shuffle() g.determine_dealer_sequence() g.deal_sequence() print(f'-- {g.player_one.name} hand:') g.player_one.display_hand() print(f'-- {g.player_two.name} hand:') g.player_two.display_hand() g.discard_sequence() print(f'-- {g.player_one.name} hand:') g.player_one.display_hand() print(f'-- {g.player_two.name} hand:') g.player_two.display_hand() print('\n----------- The crib --------------') for card in g.crib: print(f'|| {card.name}')
def test_game_driver(): #computer vs computer p1 = players.Computer(difficulty='hard') p2 = players.Computer(difficulty='medium') g = games.Cribbage(p1, p2) g.game_driver()