Ejemplo n.º 1
0
class KingDom:
    def __init__(self, secret_messages):
        # We can change the parsing methods also in this Data class
        self.secret_messages = Data(secret_messages)
        # We can implement any new decoding methods in Message class.
        self.message_decoder = Message()
        # We can implement new method ally checking methods in Ally class.
        self.ally = Ally(self.secret_messages, self.message_decoder)
        self.ally.check_ally()
Ejemplo n.º 2
0
 def test_check_ally(self):
     checker = Ally(Data("test_check_ally.txt"), Message())
     self.assertTrue("SPACE FIRE WATER AIR", checker.check_ally())