예제 #1
0
 def test_abprallen_unten(self):
     p = Partikel(40, 120)
     p.abprallen(screen_geometry)
     self.assertEqual(p.x, 40)
     self.assertEqual(p.y, 80)
예제 #2
0
 def test_abprallen_oben(self):
     p = Partikel(20, -50)
     p.abprallen(screen_geometry)
     self.assertEqual(p.x, 20)
     self.assertEqual(p.y, 50)
예제 #3
0
 def test_abprallen_rechts(self):
     p = Partikel(120, 50)
     p.abprallen(screen_geometry)
     self.assertEqual(p.x, 80)
     self.assertEqual(p.y, 50)
예제 #4
0
 def test_abprallen_links(self):
     p = Partikel(-40, 50)
     p.abprallen(screen_geometry)
     self.assertEqual(p.x, 40)
     self.assertEqual(p.y, 50)