def test_horde_show_up_two_zombies_left_in_city_no_graveyard(): gs = GameState() gs.players = [PlayerShelter(), PlayerShelter(), PlayerShelter()] gs.active_player = gs.players[1] gs.city_deck = [ CityCard(ZombieType.HORDE), CityCard(ZombieType.ZOMBIE), CityCard(ZombieType.ZOMBIE) ] gs.zombie_show_up() assert len(gs.city_deck) == 0 assert len(gs.players[0].zombies) == 1 assert len(gs.players[1].zombies) == 0 assert len(gs.players[2].zombies) == 1 assert len(gs.active_player.zombies) == 0 gs = GameState() gs.players = [PlayerShelter(), PlayerShelter(), PlayerShelter()] gs.active_player = gs.players[2] gs.city_deck = [ CityCard(ZombieType.HORDE), CityCard(ZombieType.ZOMBIE), CityCard(ZombieType.ZOMBIE) ] gs.zombie_show_up() assert len(gs.city_deck) == 0 assert len(gs.players[0].zombies) == 1 assert len(gs.players[1].zombies) == 1 assert len(gs.players[2].zombies) == 0 assert len(gs.active_player.zombies) == 0
def test_fast_zombie_show_up(): gs = GameState() gs.active_player = PlayerShelter() gs.city_deck = [CityCard(ZombieType.FAST)] gs.zombie_show_up() assert len(gs.active_player.zombies) == 1 assert gs.active_player.zombies[0].top == ZombieType.FAST assert len(gs.city_deck) == 0
def test_horde_show_up_second_time(): gs = GameState() gs.players = [PlayerShelter(), PlayerShelter(), PlayerShelter()] gs.active_player = gs.players[1] horde = ZombieType.HORDE zombie = ZombieType.ZOMBIE gs.city_deck = [ CityCard(horde), CityCard(zombie), CityCard(horde), CityCard(zombie), CityCard(zombie), CityCard(zombie), CityCard(zombie), CityCard(zombie) ] gs.zombie_show_up() assert len(gs.city_deck) == 0 assert len(gs.city_graveyard) == 2 assert len(gs.players[0].zombies) == 2 assert len(gs.players[1].zombies) == 1 assert len(gs.players[2].zombies) == 2 assert len(gs.active_player.zombies) == 1 gs = GameState() gs.players = [PlayerShelter(), PlayerShelter(), PlayerShelter()] gs.active_player = gs.players[2] gs.city_deck = [ CityCard(horde), CityCard(horde), CityCard(zombie), CityCard(zombie), CityCard(zombie), CityCard(zombie), CityCard(zombie), CityCard(zombie) ] gs.zombie_show_up() assert len(gs.city_deck) == 0 assert len(gs.city_graveyard) == 2 assert len(gs.players[0].zombies) == 2 assert len(gs.players[1].zombies) == 2 assert len(gs.players[2].zombies) == 1 assert len(gs.active_player.zombies) == 1
def test_zombie_show_up(): gs = GameState() gs.active_player = PlayerShelter() gs.city_deck = [CityCard(ZombieType.ZOMBIE)] gs.zombie_show_up() assert gs.city_deck[0].top == ZombieType.ZOMBIE assert gs.city_deck[0].bottom == ZombieType.SURVIVOR assert len(gs.city_deck) == 1 gs.zombie_show_up() assert len(gs.active_player.zombies) == 1 assert gs.active_player.zombies[0].top == ZombieType.ZOMBIE assert len(gs.city_deck) == 0 gs.city_deck = [CityCard(ZombieType.BIG)] gs.zombie_show_up() assert gs.city_deck[0].top == ZombieType.BIG assert gs.city_deck[0].bottom == ZombieType.SURVIVOR assert len(gs.city_deck) == 1 gs.zombie_show_up() assert len(gs.active_player.zombies) == 2 assert gs.active_player.zombies[1].top == ZombieType.BIG assert len(gs.city_deck) == 0
def test_zombie_show_up_empty_city(): gs = GameState() gs.active_player = PlayerShelter() gs.city_deck = [] gs.zombie_show_up() assert len(gs.active_player.zombies) == 0