Night Shift power-ups from the pause menu: Moonbeam, Sleepy Time, Star Magnet, Night Vision, one each a level, none a move
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -89,4 +89,23 @@ class NightShiftLevelsTest {
|
||||
assertEquals(24, NightProgress.totalStars(saved)); assertEquals("First Light done · The Quiet Mast in progress", chapterStatus(saved))
|
||||
assertTrue(NightProgress.better(2 to 20, 3, 30)); assertTrue(NightProgress.better(2 to 20, 2, 19)); assertFalse(NightProgress.better(2 to 20, 2, 25))
|
||||
}
|
||||
|
||||
@Test fun thePowerUpsHelpWithoutCountingAsMoves() {
|
||||
val lv = NightChapters[2].levels[3]
|
||||
val g = NightGame(lv)
|
||||
val wrong = g.wrongPieces()
|
||||
assertTrue(wrong.isNotEmpty())
|
||||
// Moonbeam turns the nearest needed piece right, free.
|
||||
val m = g.moonbeam()
|
||||
assertEquals(wrong.size - 1, m.wrongPieces().size); assertEquals(0, m.moves)
|
||||
// Star Magnet takes Owl to the next piece to turn.
|
||||
assertEquals(wrong.first(), g.starMagnet().owl)
|
||||
// Sleepy Time: the clouds stay put for ten hops, then drift again.
|
||||
var s = g.sleepyTime(); val before = s.cloudTiles().toList()
|
||||
repeat(SLEEPY_HOPS) { s = s.hop(if (s.owl % NW == 0) 1 else -1, 0) }
|
||||
assertEquals(before, s.cloudTiles().toList())
|
||||
assertNotEquals(before, s.hop(if (s.owl % NW == 0) 1 else -1, 0).cloudTiles().toList())
|
||||
// One of each a level, Sleepy Time only where there are clouds.
|
||||
assertEquals(0, NightPower.SleepyTime.forLevel(NightChapters[0].levels[0])); assertEquals(1, NightPower.SleepyTime.forLevel(lv))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user