This commit is contained in:
Mehul Makwana
2020-05-22 18:32:21 +05:30
7 changed files with 18 additions and 24 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

View File

@ -74,12 +74,12 @@ class DashboardViewModel extends ChangeNotifier {
KeyUtil.SquareRoot,
getScoreboard("square_root")));
list.add(GameCategory(
10,
"Picture Puzzle",
"picture_puzzle",
GameCategoryType.PICTURE_PUZZLE,
KeyUtil.PicturePuzzle,
getScoreboard("picture_puzzle")));
9,
"Math Grid",
"math_machine",
GameCategoryType.MATH_MACHINE,
KeyUtil.MathMachine,
getScoreboard("math_machine")));
list.add(GameCategory(
4,
"Mathematical pairs",
@ -96,15 +96,15 @@ class DashboardViewModel extends ChangeNotifier {
GameCategoryType.MAGIC_TRIANGLE,
KeyUtil.MagicTriangle,
getScoreboard("magic_tringle")));
list.add(GameCategory(
9,
"Math Grid",
"math_machine",
GameCategoryType.MATH_MACHINE,
KeyUtil.MathMachine,
getScoreboard("math_machine")));
list.add(GameCategory(
10,
"Picture Puzzle",
"picture_puzzle",
GameCategoryType.PICTURE_PUZZLE,
KeyUtil.PicturePuzzle,
getScoreboard("picture_puzzle")));
list.add(GameCategory(
11,
"Number Pyramid",
"number_pyramid",
GameCategoryType.NUMBER_PYRAMID,

View File

@ -89,8 +89,6 @@ class NumberPyramidProvider with ChangeNotifier {
_currentState.list.where((cell) => cell.text.isNotEmpty);
if (value == "DONE") {
print("cell with values ${listOfCellWithValues.length}");
print("remaining cell ${_currentState.remainingCell}");
if (listOfCellWithValues.length == _currentState.remainingCell) {
checkCorrectValues();
return;
@ -132,12 +130,9 @@ class NumberPyramidProvider with ChangeNotifier {
}
var correctVal = _currentState.list.where((cell) => cell.isCorrect == true);
print("correct val ${correctVal.length}");
if (correctVal.length == _currentState.remainingCell) {
_index = _index + 1;
_currentState = _list[_index];
currentScore = currentScore + ScoreUtil.numberPyramidScore;
if (!timeOut) {
restartTimer();
@ -153,7 +148,6 @@ class NumberPyramidProvider with ChangeNotifier {
.take(TimeUtil.numPyramidTimeOut - (levelWiseTimer))
.listen((time) {
_time = time;
print("time $_time");
notifyListeners();
}, onDone: () {
this._timeOut = true;

View File

@ -97,11 +97,11 @@ ${ScoreUtil.mathMachineScore.toInt()} for each correct equation
case GameCategoryType.PICTURE_PUZZLE:
return GameInfoDialog(
title: "Picture Puzzle",
image: "assets/math-machine-intro.gif",
image: "assets/picture-puzzle-intro.gif",
dec:
'''Select number from math grid to reach answer shown above. You can select any number to reach above answer.
'''Each shape represents a number. Find the number of each shape from given equation and solve the last equation.
${ScoreUtil.mathMachineScore.toInt()} for each correct equation
${ScoreUtil.picturePuzzleScore.toInt()} for each correct equation
''');
case GameCategoryType.NUMBER_PYRAMID:
// TODO: Handle this case.

View File

@ -36,7 +36,6 @@ class NumberPyramidDataProvider {
[6, 7, 12, 14, 15, 16, 17],
[18, 19, 20, 21, 17, 7, 6],
[2, 3, 7, 8, 11, 12, 14],
];
static List<NumberPyramidModel> getPyramidDataList(int level) {

View File

@ -19,7 +19,7 @@ class TimeUtil {
static int magicTriangleTimeOut = 60;
static int mathMachineTimeOut = 120;
static int picturePuzzleTimeOut = 300;
static int picturePuzzleTimeOut = 90;
static int numPyramidTimeOut = 120;
}

View File

@ -62,6 +62,7 @@ flutter:
- sqroot-intro.gif
- whats-the-sign-intro.gif
- num-pyramid.gif
- picture-puzzle-intro.gif
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see