<s> import random <EOL> import unittest <EOL> from hearthbreaker . agents . basic_agents import PredictableAgent , DoNothingAgent <EOL> from hearthbreaker . tags . status import ChangeAttack <EOL> from tests . agents . testing_agents import OneCardPlayingAgent , CardTestingAgent , EnemyMinionSpellTestingAgent , PlayAndAttackAgent <EOL> from tests . testing_utils import generate_game_for <EOL> from hearthbreaker . replay import playback , Replay <EOL> from hearthbreaker . cards import * <EOL> class TestPaladin ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> random . seed ( <NUM_LIT> ) <EOL> def test_AvengingWrath ( self ) : <EOL> game = generate_game_for ( MogushanWarden , AvengingWrath , OneCardPlayingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:12> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT> , game . other_player . hero . health ) <EOL> self . assertEqual ( <NUM_LIT:3> , len ( game . other_player . minions ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:1> ] . card . name ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:2> ] . card . name ) <EOL> self . assertEqual ( <NUM_LIT:6> , game . other_player . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . other_player . minions [ <NUM_LIT:1> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:5> , game . other_player . minions [ <NUM_LIT:2> ] . health ) <EOL> def test_BlessedChampion ( self ) : <EOL> game = generate_game_for ( BlessedChampion , StonetuskBoar , EnemyMinionSpellTestingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:9> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> game . other_player . minions [ <NUM_LIT:0> ] . silence ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> def test_BlessedChampion_and_Cogmaster ( self ) : <EOL> game = generate_game_for ( [ Cogmaster , MechBearCat ] , BlessedChampion , OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:10> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . other_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:4> , game . current_player . minions [ <NUM_LIT:1> ] . calculate_attack ( ) ) <EOL> def test_BlessingOfKings ( self ) : <EOL> game = generate_game_for ( BlessingOfKings , StonetuskBoar , EnemyMinionSpellTestingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:7> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:5> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:5> , game . other_player . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:5> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> game . other_player . minions [ <NUM_LIT:0> ] . silence ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> def test_BlessingOfMight ( self ) : <EOL> game = generate_game_for ( StonetuskBoar , BlessingOfMight , OneCardPlayingAgent , EnemyMinionSpellTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:2> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:4> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> game . other_player . minions [ <NUM_LIT:0> ] . silence ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> def test_BlessingOfWisdom ( self ) : <EOL> game = playback ( Replay ( "<STR_LIT>" ) ) <EOL> game . start ( ) <EOL> self . assertEqual ( <NUM_LIT:3> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT> , game . other_player . deck . left ) <EOL> def test_Consecration ( self ) : <EOL> game = generate_game_for ( StonetuskBoar , Consecration , OneCardPlayingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:7> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT:4> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> def test_DivineFavor ( self ) : <EOL> game = generate_game_for ( StonetuskBoar , DivineFavor , DoNothingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:5> ) : <EOL> game . play_single_turn ( ) <EOL> for cheat in range ( <NUM_LIT:0> , <NUM_LIT:4> ) : <EOL> game . players [ <NUM_LIT:0> ] . draw ( ) <EOL> self . assertEqual ( <NUM_LIT:10> , len ( game . players [ <NUM_LIT:0> ] . hand ) ) <EOL> self . assertEqual ( <NUM_LIT:7> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:10> , len ( game . players [ <NUM_LIT:0> ] . hand ) ) <EOL> self . assertEqual ( <NUM_LIT:10> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:10> , len ( game . players [ <NUM_LIT:0> ] . hand ) ) <EOL> self . assertEqual ( <NUM_LIT:10> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:10> , len ( game . players [ <NUM_LIT:0> ] . hand ) ) <EOL> self . assertEqual ( <NUM_LIT:10> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> def test_Equality ( self ) : <EOL> game = generate_game_for ( MogushanWarden , Equality , OneCardPlayingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:3> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:1> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:6> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:1> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:7> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:3> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:7> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:7> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:1> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:1> ] . calculate_max_health ( ) ) <EOL> game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . silence ( ) <EOL> self . assertEqual ( <NUM_LIT:7> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:7> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> def test_HammerOfWrath ( self ) : <EOL> game = generate_game_for ( MogushanWarden , HammerOfWrath , DoNothingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:7> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT:8> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT:9> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> def test_HandOfProtection ( self ) : <EOL> game = generate_game_for ( StonetuskBoar , HandOfProtection , OneCardPlayingAgent , CardTestingAgent ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertFalse ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . divine_shield ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:1> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertTrue ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . divine_shield ) <EOL> def test_HolyLight ( self ) : <EOL> game = generate_game_for ( StonetuskBoar , HolyLight , DoNothingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:3> ) : <EOL> game . play_single_turn ( ) <EOL> game . players [ <NUM_LIT:0> ] . hero . health = <NUM_LIT:20> <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> def test_HolyWrath ( self ) : <EOL> game = generate_game_for ( StonetuskBoar , HolyWrath , DoNothingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:9> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> def test_HolyWrath_fatigue ( self ) : <EOL> game = generate_game_for ( ArcaneExplosion , [ Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , <EOL> Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , <EOL> Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , Wisp , HolyWrath ] , <EOL> OneCardPlayingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:1> ] . deck . left ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:1> ] . hero . health ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , game . players [ <NUM_LIT:1> ] . deck . left ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:1> ] . hero . health ) <EOL> def test_Humility ( self ) : <EOL> game = generate_game_for ( BloodfenRaptor , Humility , OneCardPlayingAgent , CardTestingAgent ) <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> def test_LayOnHands ( self ) : <EOL> game = generate_game_for ( StonetuskBoar , LayOnHands , DoNothingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:15> ) : <EOL> game . play_single_turn ( ) <EOL> game . players [ <NUM_LIT:0> ] . hero . health = <NUM_LIT:20> <EOL> for putback in range ( <NUM_LIT:0> , <NUM_LIT:4> ) : <EOL> card = game . players [ <NUM_LIT:1> ] . hand . pop ( ) <EOL> game . players [ <NUM_LIT:1> ] . put_back ( card ) <EOL> game . players [ <NUM_LIT:1> ] . put_back ( game . players [ <NUM_LIT:1> ] . hand [ <NUM_LIT:1> ] ) <EOL> game . players [ <NUM_LIT:1> ] . hand . remove ( game . players [ <NUM_LIT:1> ] . hand [ <NUM_LIT:1> ] ) <EOL> self . assertEqual ( <NUM_LIT:5> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT:8> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT:10> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> def test_AldorPeacekeeper ( self ) : <EOL> game = generate_game_for ( AldorPeacekeeper , BloodfenRaptor , OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:4> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:1> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:1> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . silence ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> def test_ArgentProtector ( self ) : <EOL> game = generate_game_for ( ArgentProtector , BloodfenRaptor , OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:2> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertFalse ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . divine_shield ) <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertTrue ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:1> ] . divine_shield ) <EOL> game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:1> ] . silence ( ) <EOL> self . assertFalse ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:1> ] . divine_shield ) <EOL> def test_GuardianOfKings ( self ) : <EOL> game = generate_game_for ( GuardianOfKings , BloodfenRaptor , OneCardPlayingAgent , DoNothingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:12> ) : <EOL> game . play_single_turn ( ) <EOL> game . players [ <NUM_LIT:0> ] . hero . health = <NUM_LIT:20> <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> def test_EyeForAnEye ( self ) : <EOL> game = generate_game_for ( EyeForAnEye , StonetuskBoar , CardTestingAgent , PredictableAgent ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . secrets [ <NUM_LIT:0> ] . name ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:1> ] . hero . health ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . players [ <NUM_LIT:1> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:1> ] . hero . health ) <EOL> def test_NobleSacrifice ( self ) : <EOL> game = generate_game_for ( NobleSacrifice , StonetuskBoar , CardTestingAgent , PlayAndAttackAgent ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . secrets [ <NUM_LIT:0> ] . name ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:1> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> game = playback ( Replay ( "<STR_LIT>" ) ) <EOL> game . start ( ) <EOL> self . assertEqual ( <NUM_LIT:7> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . secrets [ <NUM_LIT:0> ] . name ) <EOL> def test_Redemption ( self ) : <EOL> game = generate_game_for ( [ Redemption , SilvermoonGuardian ] , WarGolem , CardTestingAgent , PredictableAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:7> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . secrets [ <NUM_LIT:0> ] . name ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertTrue ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . divine_shield ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:6> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertFalse ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . divine_shield ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertTrue ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . divine_shield ) <EOL> def test_RedemptionEnemy ( self ) : <EOL> game = generate_game_for ( [ Redemption , Whirlwind ] , StonetuskBoar , CardTestingAgent , PredictableAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:2> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . players [ <NUM_LIT:1> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:1> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> def test_RedemptionAoE ( self ) : <EOL> game = generate_game_for ( [ Redemption , StonetuskBoar , StonetuskBoar , StonetuskBoar ] , ConeOfCold , <EOL> CardTestingAgent , OneCardPlayingAgent ) <EOL> game . players [ <NUM_LIT:1> ] . agent . choose_target = lambda targets : targets [ <NUM_LIT:1> ] <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:7> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . current_player . secrets ) ) <EOL> self . assertEqual ( <NUM_LIT:3> , len ( game . current_player . minions ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . other_player . secrets ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . other_player . minions ) ) <EOL> def test_Redemption_NobleSacrifice ( self ) : <EOL> game = generate_game_for ( [ NobleSacrifice , Redemption ] , BluegillWarrior , OneCardPlayingAgent , PlayAndAttackAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:3> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . other_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . current_player . secrets ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . other_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . other_player . secrets ) ) <EOL> def test_Redemption_full_board ( self ) : <EOL> game = generate_game_for ( Assassinate , [ Redemption , Wisp , Wisp , Wisp , Wisp , Wisp , HauntedCreeper ] , <EOL> OneCardPlayingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:8> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:6> , len ( game . current_player . minions ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:7> , len ( game . other_player . minions ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:1> ] . card . name ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:2> ] . card . name ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:3> ] . card . name ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:4> ] . card . name ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:5> ] . card . name ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:6> ] . card . name ) <EOL> def test_Repentance ( self ) : <EOL> game = generate_game_for ( Repentance , TwilightDrake , CardTestingAgent , OneCardPlayingAgent ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . secrets [ <NUM_LIT:0> ] . name ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:7> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:1> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:1> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> def test_RepentanceSelf ( self ) : <EOL> game = generate_game_for ( [ Repentance , BluegillWarrior ] , TwilightDrake , CardTestingAgent , DoNothingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:3> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> def test_LightsJustice ( self ) : <EOL> game = generate_game_for ( LightsJustice , StonetuskBoar , PredictableAgent , DoNothingAgent ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . weapon . base_attack ) <EOL> self . assertEqual ( <NUM_LIT:4> , game . players [ <NUM_LIT:0> ] . weapon . durability ) <EOL> def test_SwordOfJustice ( self ) : <EOL> game = generate_game_for ( [ SwordOfJustice , MagmaRager , MagmaRager , MagmaRager , MagmaRager , MagmaRager ] , <EOL> StonetuskBoar , OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:4> ) : <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . weapon . base_attack ) <EOL> self . assertEqual ( <NUM_LIT:5> , game . players [ <NUM_LIT:0> ] . weapon . durability ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:9> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . weapon . durability ) <EOL> self . assertEqual ( <NUM_LIT:4> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> for i in range ( <NUM_LIT:0> , <NUM_LIT:4> ) : <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:0> ] . minions [ i ] . calculate_max_health ( ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:0> ] . minions [ i ] . health ) <EOL> self . assertEqual ( <NUM_LIT:6> , game . players [ <NUM_LIT:0> ] . minions [ i ] . calculate_attack ( ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( None , game . players [ <NUM_LIT:0> ] . weapon ) <EOL> self . assertEqual ( <NUM_LIT:5> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:6> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . silence ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:5> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> def test_TruesilverChampion ( self ) : <EOL> game = generate_game_for ( [ TruesilverChampion , MindControl ] , StonetuskBoar , PlayAndAttackAgent , <EOL> OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:6> ) : <EOL> game . play_single_turn ( ) <EOL> game . players [ <NUM_LIT:0> ] . hero . health = <NUM_LIT:20> <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:4> , game . players [ <NUM_LIT:0> ] . weapon . base_attack ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . weapon . durability ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> def test_TirionFordring ( self ) : <EOL> game = generate_game_for ( TirionFordring , StonetuskBoar , OneCardPlayingAgent , DoNothingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:15> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:6> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:6> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertEqual ( None , game . players [ <NUM_LIT:0> ] . weapon ) <EOL> tirion = game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] <EOL> tirion . die ( None ) <EOL> tirion . activate_delayed ( ) <EOL> self . assertEqual ( <NUM_LIT:5> , game . players [ <NUM_LIT:0> ] . weapon . base_attack ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . weapon . durability ) <EOL> def test_Avenge ( self ) : <EOL> game = generate_game_for ( [ Avenge , StonetuskBoar , StonetuskBoar ] , Frostbolt , <EOL> CardTestingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:3> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . current_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . current_player . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . current_player . minions [ <NUM_LIT:1> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . current_player . minions [ <NUM_LIT:1> ] . calculate_max_health ( ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . other_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:4> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . other_player . minions [ <NUM_LIT:0> ] . calculate_max_health ( ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . other_player . secrets ) ) <EOL> def test_AvengewithAoE ( self ) : <EOL> game = generate_game_for ( Flamestrike , [ Avenge , Shieldbearer , IronfurGrizzly , Deathwing ] , <EOL> OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:12> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . current_player . minions ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . other_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . other_player . secrets ) ) <EOL> def test_NobleSacrifice_hero ( self ) : <EOL> game = generate_game_for ( NobleSacrifice , Naturalize , OneCardPlayingAgent , PredictableAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:3> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:1> ] . hero . health ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . secrets ) ) <EOL> self . assertEqual ( <NUM_LIT:30> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:1> ] . hero . health ) <EOL> def test_CobaltGuardian ( self ) : <EOL> game = generate_game_for ( [ CobaltGuardian , HarvestGolem ] , StonetuskBoar , OneCardPlayingAgent , DoNothingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:9> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertFalse ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . divine_shield ) <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertTrue ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:1> ] . divine_shield ) <EOL> def test_Coghammer ( self ) : <EOL> game = generate_game_for ( [ StonetuskBoar , Coghammer ] , StonetuskBoar , OneCardPlayingAgent , DoNothingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:4> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertFalse ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . divine_shield ) <EOL> self . assertFalse ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . taunt ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:0> ] . weapon . base_attack ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . weapon . durability ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertTrue ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . divine_shield ) <EOL> self . assertTrue ( game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . taunt ) <EOL> def test_SealOfLight ( self ) : <EOL> game = generate_game_for ( SealOfLight , StonetuskBoar , PlayAndAttackAgent , DoNothingAgent ) <EOL> game . players [ <NUM_LIT:0> ] . hero . health = <NUM_LIT> <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:3> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:0> ] . hero . health ) <EOL> self . assertEqual ( <NUM_LIT> , game . players [ <NUM_LIT:1> ] . hero . health ) <EOL> def test_MusterForBattle ( self ) : <EOL> game = generate_game_for ( MusterForBattle , Counterspell , OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:5> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . weapon . base_attack ) <EOL> self . assertEqual ( <NUM_LIT:4> , game . players [ <NUM_LIT:0> ] . weapon . durability ) <EOL> self . assertEqual ( <NUM_LIT:3> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( "<STR_LIT>" , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . card . name ) <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:3> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> def test_Quartermaster ( self ) : <EOL> game = generate_game_for ( [ MusterForBattle , Quartermaster ] , Wisp , OneCardPlayingAgent , DoNothingAgent ) <EOL> for turn in range ( <NUM_LIT:0> , <NUM_LIT:10> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:4> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:5> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:0> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:1> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:1> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:2> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:2> ] . health ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:3> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . players [ <NUM_LIT:0> ] . minions [ <NUM_LIT:3> ] . health ) <EOL> def test_ScarletPurifier ( self ) : <EOL> game = generate_game_for ( [ LootHoarder , ScarletPurifier ] , [ StonetuskBoar , NerubianEgg ] , <EOL> CardTestingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:5> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . other_player . minions ) ) <EOL> self . assertEqual ( "<STR_LIT>" , game . current_player . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:0> ] . card . name ) <EOL> self . assertEqual ( "<STR_LIT>" , game . other_player . minions [ <NUM_LIT:1> ] . card . name ) <EOL> def test_BolvarFordragon ( self ) : <EOL> game = generate_game_for ( [ MusterForBattle , BolvarFordragon ] , [ FanOfKnives ] , <EOL> OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:9> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:4> , game . current_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , game . current_player . minions [ <NUM_LIT:0> ] . card . calculate_stat ( ChangeAttack ) ) <EOL> def test_Bolvar_and_Hobgoblin ( self ) : <EOL> game = generate_game_for ( [ MusterForBattle , Hobgoblin , BolvarFordragon ] , [ FanOfKnives ] , <EOL> OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:9> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:4> , game . current_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , game . current_player . minions [ <NUM_LIT:0> ] . card . calculate_stat ( ChangeAttack ) ) <EOL> def test_Bolvar_and_Warsong ( self ) : <EOL> game = generate_game_for ( [ MusterForBattle , WarsongCommander , BolvarFordragon ] , [ FanOfKnives ] , <EOL> OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:9> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:4> , game . current_player . minions [ <NUM_LIT:0> ] . calculate_attack ( ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , game . current_player . minions [ <NUM_LIT:0> ] . card . calculate_stat ( ChangeAttack ) ) <EOL> self . assertFalse ( game . current_player . minions [ <NUM_LIT:0> ] . charge ( ) ) <EOL> def test_SolemnVigil ( self ) : <EOL> game = generate_game_for ( Wisp , [ Consecration , SolemnVigil ] , CardTestingAgent , CardTestingAgent ) <EOL> for turn in range ( <NUM_LIT:7> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:7> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:8> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . players [ <NUM_LIT:0> ] . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:9> , len ( game . players [ <NUM_LIT:1> ] . hand ) ) <EOL> def test_DragonConsort_no_dragon ( self ) : <EOL> game = generate_game_for ( [ DragonConsort , Ysera , Alexstrasza ] , Chromaggus , <EOL> OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:11> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . other_player . minions ) ) <EOL> game . play_single_turn ( ) <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . other_player . minions ) ) <EOL> def test_DragonConsort ( self ) : <EOL> game = generate_game_for ( [ DragonConsort , RagnarosTheFirelord ] , Chromaggus , <EOL> OneCardPlayingAgent , OneCardPlayingAgent ) <EOL> for turn in range ( <NUM_LIT:11> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( game . current_player . minions ) ) <EOL> self . assertEqual ( <NUM_LIT:0> , len ( game . other_player . minions ) ) <EOL> def test_ArgentLance ( self ) : <EOL> game = generate_game_for ( [ ArgentLance , KoboldGeomancer ] , StonetuskBoar , OneCardPlayingAgent , DoNothingAgent ) <EOL> for turn in range ( <NUM_LIT:3> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:3> , game . current_player . weapon . durability ) <EOL> def test_ArgentLance_lost_joust ( self ) : <EOL> game = generate_game_for ( ArgentLance , AldorPeacekeeper , OneCardPlayingAgent , DoNothingAgent ) <EOL> for turn in range ( <NUM_LIT:3> ) : <EOL> game . play_single_turn ( ) <EOL> self . assertEqual ( <NUM_LIT:2> , game . current_player . weapon . durability ) </s>
