Compare commits
3 Commits
8c3dbc8fcd
...
d57022f742
| Author | SHA1 | Date | |
|---|---|---|---|
| d57022f742 | |||
| a3aa761739 | |||
| 4222e76262 |
@@ -8,6 +8,9 @@ if __name__ == "__main__":
|
||||
print("do you wanna play a round??")
|
||||
|
||||
game = Game()
|
||||
try:
|
||||
while True:
|
||||
# os.system("clear")
|
||||
game.play_round()
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("End Program")
|
||||
|
||||
28
tests/test_player.py
Normal file
28
tests/test_player.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import pytest
|
||||
|
||||
from pyjack.player import Player
|
||||
from pyjack.deck import Deck
|
||||
|
||||
|
||||
# Start Fixtures
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def player() -> Player:
|
||||
"""Fixture for the player test."""
|
||||
player = Player(0)
|
||||
return player
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def deck() -> Deck:
|
||||
deck = Deck()
|
||||
return deck
|
||||
|
||||
|
||||
# Start Tests:
|
||||
|
||||
|
||||
def test_player_hit_one_card(player, deck):
|
||||
player.hit(deck)
|
||||
assert len(player.hand.cards) == 1
|
||||
Reference in New Issue
Block a user