本文整理汇总了Python中tests.agents.trade.test_helpers.TestHelpers.play_single_turn方法的典型用法代码示例。如果您正苦于以下问题:Python TestHelpers.play_single_turn方法的具体用法?Python TestHelpers.play_single_turn怎么用?Python TestHelpers.play_single_turn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tests.agents.trade.test_helpers.TestHelpers
的用法示例。
在下文中一共展示了TestHelpers.play_single_turn方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_buff_target
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_buff_target(self):
game = TestHelpers().make_game()
self.add_minions(game, 0, BloodfenRaptor(), RiverCrocolisk())
self.make_all_active(game)
self.add_minions(game, 0, AbusiveSergeant())
game.play_single_turn()
示例2: test_will_play_three_cards
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_will_play_three_cards(self):
game = TestHelpers().make_game()
self.set_hand(game, 0, Wisp(), ArgentSquire(), DireWolfAlpha())
self.set_mana(game, 0, 3)
game.play_single_turn()
self.assert_minions(game.players[0], "Wisp", "Argent Squire", "Dire Wolf Alpha")
示例3: test_will_use_entire_pool
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_will_use_entire_pool(self):
game = TestHelpers().make_game()
game.players[0].hand = self.make_cards(DireWolfAlpha(), DireWolfAlpha(), DireWolfAlpha(), HarvestGolem())
game.players[0].mana = 3
game.players[0].max_mana = 3
game.play_single_turn()
self.assert_minions(game.players[0], "Dire Wolf Alpha", "Dire Wolf Alpha")
示例4: test_will_play_multiple_correct_order
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_will_play_multiple_correct_order(self):
game = TestHelpers().make_game()
game.players[0].hand = self.make_cards(ArgentSquire(), ArgentSquire(), ArgentSquire(), HarvestGolem())
game.players[0].mana = 3
game.players[0].max_mana = 3
game.play_single_turn()
self.assert_minions(game.players[0], "Harvest Golem", "Argent Squire")
示例5: test_will_play_multiple
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_will_play_multiple(self):
game = TestHelpers().make_game()
game.players[0].hand = self.make_cards(ArgentSquire(), ArgentSquire(), ArgentSquire())
game.players[0].mana = 1
game.players[0].max_mana = 1
game.play_single_turn()
self.assert_minions(game.players[0], "Argent Squire", "Argent Squire")
示例6: test_will_play_biggest
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_will_play_biggest(self):
game = TestHelpers().make_game()
game.players[0].hand = self.make_cards(ArgentSquire(), ArgentSquire(), DireWolfAlpha())
game.players[0].mana = 1
game.players[0].max_mana = 1
game.play_single_turn()
self.assert_minions(game.players[0], "Dire Wolf Alpha")
示例7: test_wont_kill_self_with_hero_power
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_wont_kill_self_with_hero_power(self):
game = TestHelpers().make_game()
self.set_hand(game, 0)
self.set_mana(game, 0, 10)
game.players[0].hero.health = 1
game.play_single_turn()
self.assert_minions(game.players[0])
self.assertEqual(game.players[0].hero.health, 1)
示例8: test_will_attack_twice
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_will_attack_twice(self):
game = TestHelpers().make_game()
self.add_minions(game, 1, Wisp(), GoldshireFootman())
self.add_minions(game, 0, BloodfenRaptor(), RiverCrocolisk())
self.make_all_active(game)
game.play_single_turn()
self.assert_minions(game.players[1])
self.assert_minions(game.players[0], "Bloodfen Raptor", "River Crocolisk")
示例9: test_will_respect_taunt
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_will_respect_taunt(self):
game = TestHelpers().make_game()
self.add_minions(game, 1, Wisp(), GoldshireFootman())
self.add_minions(game, 0, BloodfenRaptor())
self.make_all_active(game)
game.play_single_turn()
self.assert_minions(game.players[1], "Wisp")
self.assert_minions(game.players[0], "Bloodfen Raptor")
示例10: test_basic_trade
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_basic_trade(self):
game = TestHelpers().make_game()
self.add_minions(game, 1, Wisp(), WarGolem())
self.add_minions(game, 0, BloodfenRaptor())
self.make_all_active(game)
game.play_single_turn()
self.assert_minions(game.players[1], "War Golem")
self.assert_minions(game.players[0], "Bloodfen Raptor")
示例11: test_will_use_hero_power_with_empty_hand
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_will_use_hero_power_with_empty_hand(self):
game = TestHelpers().make_game()
self.set_hand(game, 0)
self.set_mana(game, 0, 10)
possible = PossiblePlays([], 10)
play = possible.plays()[0]
self.assertEqual(play.cards[0].name, "Hero Power")
game.play_single_turn()
self.assert_minions(game.players[0], "War Golem")
示例12: test_archer_attacks_enemy
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_archer_attacks_enemy(self):
game = TestHelpers().make_game()
self.set_hand(game, 0, ElvenArcher())
self.set_board(game, 0, Shieldbearer())
self.set_board(game, 1, BloodfenRaptor())
self.make_all_active(game)
game.play_single_turn()
self.assert_minions(game.players[0], "Shieldbearer", "Elven Archer")
self.assertEqual(game.players[1].minions[0].health, 1)
示例13: test_will_attack_face
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_will_attack_face(self):
game = TestHelpers().make_game()
self.add_minions(game, 0, BloodfenRaptor())
self.make_all_active(game)
game.play_single_turn()
self.assert_minions(game.players[1])
self.assert_minions(game.players[0], "Bloodfen Raptor")
self.assertEqual(27, game.players[1].hero.health)
示例14: test_abusive
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_abusive(self):
game = TestHelpers().make_game()
self.set_hand(game, 0, AbusiveSergeant())
self.set_board(game, 0, Wisp())
self.set_board(game, 1, RiverCrocolisk())
self.make_all_active(game)
game.play_single_turn()
self.assert_minions(game.players[0], "Abusive Sergeant")
self.assert_minions(game.players[1])
示例15: test_commando_attacks_enemy
# 需要导入模块: from tests.agents.trade.test_helpers import TestHelpers [as 别名]
# 或者: from tests.agents.trade.test_helpers.TestHelpers import play_single_turn [as 别名]
def test_commando_attacks_enemy(self):
game = TestHelpers().make_game()
self.set_hand(game, 0, StormpikeCommando())
self.set_board(game, 0, Wisp())
self.set_board(game, 1, BloodfenRaptor())
self.set_mana(game, 0, 5)
self.make_all_active(game)
game.play_single_turn()
self.assert_minions(game.players[0], "Wisp", "Stormpike Commando")
self.assert_minions(game.players[1])