v1.4: Tempo erhoeht - Normal 740 px/s (+30%), Hard 1080 (+50%), Easy unveraendert. Snap-Fenster 160->200 px, damit genug Zeit fuer Befehle bleibt. 57 Tests gruen.
This commit is contained in:
1 parent
441bdb440c
commit
7f590a6f74
5 files changed
+32
-9
No files matched your search
+11
-3
@@ -85,9 +85,17 @@ class DifficultyTests(unittest.TestCase):
|
||||
self.assertEqual([d.key for d in DIFFICULTIES], ["easy", "normal", "hard"])
|
||||
self.assertEqual([d.label for d in DIFFICULTIES], ["Easy", "Normal", "Hard"])
|
||||
|
||||
def test_hard_matches_old_game_speed(self) -> None:
|
||||
hard = by_key("hard")
|
||||
self.assertEqual((hard.speed_fast, hard.speed_slow), (720.0, 240.0))
|
||||
def test_speeds_match_the_requested_levels(self) -> None:
|
||||
self.assertEqual(
|
||||
[(d.speed_fast, d.speed_slow) for d in DIFFICULTIES],
|
||||
[(420.0, 140.0), (740.0, 250.0), (1080.0, 360.0)],
|
||||
)
|
||||
# Gegenüber der ersten Fassung (Normal 570, Hard 720):
|
||||
# Normal ~30 % schneller, Hard ~50 % schneller
|
||||
self.assertAlmostEqual(by_key("normal").speed_fast / 570.0, 1.30, delta=0.02)
|
||||
self.assertAlmostEqual(by_key("hard").speed_fast / 720.0, 1.50, delta=0.02)
|
||||
self.assertAlmostEqual(by_key("normal").speed_slow / 190.0, 1.30, delta=0.02)
|
||||
self.assertAlmostEqual(by_key("hard").speed_slow / 240.0, 1.50, delta=0.02)
|
||||
|
||||
def test_speeds_increase_with_difficulty(self) -> None:
|
||||
fast = [d.speed_fast for d in DIFFICULTIES]
|
||||
|
||||
Reference in new issue
Block a user