def test_move_the_dealer2(): player1 = lapi.Player() player2 = lapi.Player() player3 = lapi.Player() player3.dealer_status = True list_of_players = [player1, player2, player3] lapi.move_dealer(list_of_players, None, None, False) assert player1.dealer_status and not player3.dealer_status
def test_lulo_recolection(): player1 = lapi.Player() player2 = lapi.Player() player3 = lapi.Player() player1.lulo_status = True player2.lulo_status = True gro = lapi.GlobalRound([player1, player2, player3], 100) gro.collect_money_from_lulo_players() assert player1.chips == 4900 and player2.chips == 4900
def test_multiple_players_recieving_hands(): player1 = lapi.Player() player2 = lapi.Player() player3 = lapi.Player() deck = lapi.Deck() player1.recieve_hand(deck) player2.recieve_hand(deck) player3.recieve_hand(deck) for card in player1.hand: if card in player2.hand or card in player3.hand: assert False for card in player2.hand: if card in player3.hand: assert False for card in player1.hand + player2.hand + player3.hand: if card in deck.current_deck: assert False
def test_create_player_and_bet(): player1 = lapi.Player() money = player1.bet(50) assert money == 50
def test_not_bet_more_than_had(): player1 = lapi.Player() try: player1.bet(5001) except: pass
def test_not_bet_negatives(): player1 = lapi.Player() try: player1.bet(-5) except: pass
def test_set_as_dealer(): player1 = lapi.Player() player1.dealer_status = True assert player1.is_dealer()