From 7c6494e9e556488c26b215ebb6ac5a91b988dc42 Mon Sep 17 00:00:00 2001 From: nathanvandeperre97 Date: Mon, 21 Feb 2022 17:53:17 +0100 Subject: [PATCH] fix(shuffle) : fix tests --- lib/bloc/puzzle_cubit.dart | 2 +- lib/models/puzzle.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bloc/puzzle_cubit.dart b/lib/bloc/puzzle_cubit.dart index f50fa8a..d9c5f82 100644 --- a/lib/bloc/puzzle_cubit.dart +++ b/lib/bloc/puzzle_cubit.dart @@ -8,7 +8,7 @@ import 'package:puzzle/models/models.dart'; import 'package:puzzle/services/audio_service.dart'; class PuzzleCubit extends Cubit { - PuzzleCubit() : super(PuzzleState(Puzzle.generate(4))); + PuzzleCubit() : super(PuzzleState(Puzzle.generate(4)..shuffle())); AudioService audioService = GetIt.I.get(); void shuffle() { diff --git a/lib/models/puzzle.dart b/lib/models/puzzle.dart index 93ae80d..17489f4 100644 --- a/lib/models/puzzle.dart +++ b/lib/models/puzzle.dart @@ -32,7 +32,7 @@ class Puzzle { return Puzzle( complexity: complexity, - data: data..shuffle(), + data: data, ); }