Esempio n. 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)
Esempio n. 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)
Esempio n. 3
0
 def testOngoing(self):
     myManager = HM_manage.HMmanager()
     myManager.myObfuscator = Obfuscator.aObfuscator("testWord")
     myManager.checkCharacter('a')
     self.assertEqual(myManager.winState, 0)
Esempio n. 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)
Esempio n. 5
0
 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)
Esempio n. 6
0
 def testOngoing(self):
     myManager = HM_manage.HMmanager()
     myManager.myObfuscator = Obfuscator.aObfuscator("testWord")
     myManager.checkCharacter('a')
     self.assertEqual(myManager.winState, 0)
Esempio n. 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)
Esempio n. 8
0
 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)