🐐
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
from dotenv import load_dotenv
|
||||
load_dotenv()
|
||||
|
||||
from game import (
|
||||
GameState, PlayerState, CardInstance, CombatEvent, GameResult,
|
||||
create_game, resolve_combat, check_win_condition,
|
||||
@@ -222,7 +225,7 @@ class TestSacrifice:
|
||||
err = action_sacrifice(state, slot=0)
|
||||
assert err is None
|
||||
assert state.players["p1"].board[0] is None
|
||||
assert state.players["p1"].energy == 4
|
||||
assert state.players["p1"].energy == 2
|
||||
|
||||
def test_sacrifice_empty_slot(self):
|
||||
state = make_game(p1_energy=3)
|
||||
@@ -249,10 +252,10 @@ class TestSacrifice:
|
||||
cheap = make_card(name="Cheap", cost=3)
|
||||
expensive = make_card(name="Expensive", cost=5)
|
||||
board = [None] + [cheap] + [None] * (BOARD_SIZE - 2)
|
||||
state = make_game(p1_board=board, p1_hand=[expensive], p1_energy=2)
|
||||
state = make_game(p1_board=board, p1_hand=[expensive], p1_energy=4)
|
||||
err1 = action_play_card(state, hand_index=0, slot=0)
|
||||
assert err1 is not None
|
||||
assert err1 == "Not enough energy (have 2, need 5)"
|
||||
assert err1 == "Not enough energy (have 4, need 5)"
|
||||
|
||||
action_sacrifice(state, slot=1)
|
||||
assert state.players["p1"].energy == 5
|
||||
|
||||
Reference in New Issue
Block a user