예제 #1
0
 def test_tab_rect(self):
     pad = Pad()
     pad.setWidth(4)
     rect = pygame.Rect(280, 460, 160, 20)
     self.assertEqual(pad.rect, rect)
예제 #2
0
 def test_get_pad_pos(self):
     pad = Pad()
     (x, y) = (pad.position[0], pad.position[1])
     self.assertEqual(pad.pos(), (x, y))
예제 #3
0
 def test_pad_reset_state(self):
     pad = Pad()
     self.assertEqual(pad.gridWidth, 3)
     self.assertEqual(pad.position, [280, 460])
     self.assertEqual(pad.lastMove, -1)
예제 #4
0
 def test_is_pad_move(self):
     pad = Pad()
     self.assertTrue(pad.move(10))
예제 #5
0
 def test_last_move_init_state(self):
     pad = Pad()
     self.assertEqual(pad.lastMove, -1)
예제 #6
0
 def test_tab_rect(self):
     pad = Pad()
     rect = pygame.Rect(280, 460, 120, 20)
     self.assertEqual(pad.rect, rect)
예제 #7
0
 def test_tab_images_loaded(self):
     pad = Pad()
     self.assertNotEqual(pad.graphics, {})
예제 #8
0
 def test_pad_init_pos(self):
     pad = Pad()
     self.assertEqual(pad.position, [280, 460])
예제 #9
0
 def test_grid_width(self):
     pad = Pad()
     self.assertEqual(pad.gridWidth, 3)