Ejemplo n.º 1
0
 def testLightning_debug1(self):
     instructions = ["turn on 0,0 through 9,9", "toggle 5,5 through 5,5", "toggle 1,1 through 1,1"]
     self.assertEquals(98, dec06.lightning(instructions))
Ejemplo n.º 2
0
 def testLightingExample2(self):
     instructions = ["toggle 0,0 through 999,0"]
     self.assertEquals(1000, dec06.lightning(instructions))
Ejemplo n.º 3
0
 def testLightingExample3(self):
     instructions = ["turn on 0,0 through 999,999", "turn off 499,499 through 500,500"]
     self.assertEquals(999996, dec06.lightning(instructions))
Ejemplo n.º 4
0
 def testLightingExample1(self):
     instructions = ["turn on 0,0 through 999,999"]
     self.assertEquals(1000000, dec06.lightning(instructions))