feat(engine): shuffle booster re-deals the tray
This commit is contained in:
@@ -46,4 +46,24 @@ void main() {
|
||||
e.declineAndLose();
|
||||
expect(e.useHammer(0, 0), isFalse);
|
||||
});
|
||||
|
||||
test('useShuffle replaces the tray without spending a move or scoring', () {
|
||||
final e = GameEngine(_stage());
|
||||
final before = List.of(e.tray);
|
||||
final score0 = e.score;
|
||||
final moves0 = e.movesUsed;
|
||||
|
||||
final ok = e.useShuffle();
|
||||
|
||||
expect(ok, isTrue);
|
||||
expect(e.tray.length, before.length);
|
||||
expect(e.score, score0);
|
||||
expect(e.movesUsed, moves0);
|
||||
});
|
||||
|
||||
test('useShuffle is rejected after the attempt finishes', () {
|
||||
final e = GameEngine(_stage());
|
||||
e.declineAndLose();
|
||||
expect(e.useShuffle(), isFalse);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user