Example #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)
Example #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)
Example #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)
Example #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)