当前位置: 首页>>代码示例>>Python>>正文


Python Wizard.strike方法代码示例

本文整理汇总了Python中wizard.Wizard.strike方法的典型用法代码示例。如果您正苦于以下问题:Python Wizard.strike方法的具体用法?Python Wizard.strike怎么用?Python Wizard.strike使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wizard.Wizard的用法示例。


在下文中一共展示了Wizard.strike方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_no_manna

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_no_manna(self):
     wizard = Wizard("Test", 40, 10, 0)
     opponent = Wizard("Opponent", 40, 10, 20)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 0)
开发者ID:greenfox-academy,项目名称:HDodek,代码行数:7,代码来源:wizard_test.py

示例2: test_strike_wo_mana

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
	def test_strike_wo_mana(self):
		wizard = Wizard('GHAARRiYYY', 50, 30, 0)
		opponent = Wizard('VOLDERMORT', 100, 70, 20)
		wizard.strike(opponent)
		self.assertEqual(opponent.hp, 90)
开发者ID:greenfox-academy,项目名称:kristoftombacz,代码行数:7,代码来源:wizard_test.py

示例3: test_without_manna

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_without_manna(self):
     wizard = Wizard("Merlin", 40, 10, 20)
     opponent = Wizard("Other",30, 5, 20)
     wizard.strike(opponent)
     self.assertEqual(opponent.manna, 15)
开发者ID:greenfox-academy,项目名称:bauerjudit,代码行数:7,代码来源:wizard_test.py

示例4: test_strike_too_less_manna

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_strike_too_less_manna(self):
     wizard = Wizard('Merlin', 40, 12, 4)
     opponent = Wizard('Oz', 40, 10, 30)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 4)
     self.assertEqual(opponent.hp, 36)
开发者ID:greenfox-academy,项目名称:KoDa505,代码行数:8,代码来源:wizard_test.py

示例5: test_strike_with_manna

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_strike_with_manna(self):
     wizard = Wizard("Merlin", 40, 10, 20)
     opponent = Wizard("Malfoy", 30, 5, 10)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 15)
开发者ID:florimaros,项目名称:florimaros,代码行数:7,代码来源:test_wizard.py

示例6: test_strike_less_than_five_manna

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_strike_less_than_five_manna(self):
     wizard = Wizard("Merlin", 40, 9, 4)
     opponent = Wizard("opi", 40, 10, 20)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 4)
     self.assertEqual(opponent.hp, 37)
开发者ID:greenfox-academy,项目名称:purple-flower,代码行数:8,代码来源:wizard_test.py

示例7: test_strike_manna_decrease

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_strike_manna_decrease(self):
     wizard = Wizard('Merlin', 40, 10, 20)
     opponent = Wizard('Oz', 40, 10, 30)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 15)
开发者ID:greenfox-academy,项目名称:KoDa505,代码行数:7,代码来源:wizard_test.py

示例8: test_strike_manna_strong

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_strike_manna_strong(self):
     wizard = Wizard('TestWizard', 100, 10, 10)
     enemy = Character('TestCharacter', 100, 10)
     wizard.strike(enemy)
     self.assertEqual(enemy.hp, 70)
开发者ID:glukocerin,项目名称:mrakosms,代码行数:7,代码来源:wizard_test.py

示例9: test_strike_manna_reduce

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_strike_manna_reduce(self):
     wizard = Wizard('Merlin', 40, 10, 6)
     enemy = Wizard('Oz', 50, 8, 5)
     wizard.strike(enemy)
     self.assertEqual(wizard.manna, 6-5)
开发者ID:greenfox-academy,项目名称:noreng,代码行数:7,代码来源:wizard_test.py

示例10: test_strike_with_manna

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_strike_with_manna(self):
     wizard = Wizard('Merlin', 40, 10, 20)
     opponent = Wizard('Malfoy', 30, 5, 10)
     wizard.strike(opponent)
     self.assertEqual(opponent.hp, 0)
开发者ID:BiroSandor,项目名称:velox-syllabus,代码行数:7,代码来源:wizard_test.py

示例11: test_strike_manna_week

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_strike_manna_week(self):
     wizard = Wizard('TestWizard', 100, 9, 4)
     enemy = Character('TestCharacter', 100, 10)
     wizard.strike(enemy)
     self.assertEqual(enemy.hp, 97)
开发者ID:glukocerin,项目名称:mrakosms,代码行数:7,代码来源:wizard_test.py

示例12: test_no_reduce_manna

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_no_reduce_manna(self):
     wizard = Wizard('Merlin', 40, 10, 0)
     opponent = Wizard('Malfoy', 30, 5, 10)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 0)
开发者ID:BiroSandor,项目名称:velox-syllabus,代码行数:7,代码来源:wizard_test.py

示例13: test_strike_without_manna

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_strike_without_manna(self):
     wizard = Wizard("Test", 40, 5, 0)
     opponent = Wizard("Opponent", 40, 10, 20)
     wizard.strike(opponent)
     self.assertEqual(opponent.hp, 27)
开发者ID:greenfox-academy,项目名称:HDodek,代码行数:7,代码来源:wizard_test.py

示例14: test_more_than_5_manna

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_more_than_5_manna(self):
     wizard = Wizard("Test", 40, 10, 20)
     opponent = Wizard("Opponent", 40, 10, 20)
     self.assertEqual(wizard.manna, 15)
     wizard.strike(opponent)
     sels.assertEqual(opponent.hp, 0)
开发者ID:greenfox-academy,项目名称:HDodek,代码行数:8,代码来源:wizard_test.py

示例15: test_strike_4

# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
 def test_strike_4(self):
     wizard = Wizard("Harry", 40, 10, 25)
     opponent = Wizard("Hermioner", 9, 2, 10)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 20)
开发者ID:greenfox-academy,项目名称:marijanka,代码行数:7,代码来源:wizard_test.py


注:本文中的wizard.Wizard.strike方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。