コード例 #1
0
 def testLoss(self):
     myManager = HM_manage.HMmanager()
     myLives = myManager.myLives
     myManager.myObfuscator = Obfuscator.aObfuscator("testWord")
     for i in range(0, myLives):
         print myManager.myLives
         myManager.checkCharacter('a')
     self.assertLess(myManager.winState, 0)
コード例 #2
0
 def testLoss(self):
     myManager = HM_manage.HMmanager()
     myLives = myManager.myLives
     myManager.myObfuscator = Obfuscator.aObfuscator("testWord")
     for i in range(0, myLives):
         print myManager.myLives
         myManager.checkCharacter('a')
     self.assertLess(myManager.winState, 0)
コード例 #3
0
 def testOngoing(self):
     myManager = HM_manage.HMmanager()
     myManager.myObfuscator = Obfuscator.aObfuscator("testWord")
     myManager.checkCharacter('a')
     self.assertEqual(myManager.winState, 0)
コード例 #4
0
 def testRun(self):
     myManager = HM_manage.HMmanager()
     myLives = myManager.myLives
     myManager.myObfuscator = Obfuscator.aObfuscator("testWord")
     myManager.checkCharacter('a')
     self.assertEqual(myManager.myLives, myLives - 1)
コード例 #5
0
ファイル: HM_manage.py プロジェクト: wtpfede/HM_project_final
 def __init__(self):
     self.myLives = 5
     self.winState = 0  #0 = ongoing, 1 won, -1 lost
     self.mySelector = WordSelector.aWordSelector()
     self.myWord = self.mySelector.myWord
     self.myObfuscator = Obfuscator.aObfuscator(self.myWord)
コード例 #6
0
 def testOngoing(self):
     myManager = HM_manage.HMmanager()
     myManager.myObfuscator = Obfuscator.aObfuscator("testWord")
     myManager.checkCharacter('a')
     self.assertEqual(myManager.winState, 0)
コード例 #7
0
 def testRun(self):
     myManager = HM_manage.HMmanager()
     myLives = myManager.myLives
     myManager.myObfuscator = Obfuscator.aObfuscator("testWord")
     myManager.checkCharacter('a')
     self.assertEqual(myManager.myLives,myLives-1)
コード例 #8
0
ファイル: HM_manage.py プロジェクト: wtpfede/HM_project_final
 def __init__(self):
     self.myLives = 5
     self.winState = 0 #0 = ongoing, 1 won, -1 lost
     self.mySelector = WordSelector.aWordSelector()
     self.myWord = self.mySelector.myWord
     self.myObfuscator = Obfuscator.aObfuscator(self.myWord)