mirror of
https://github.com/jaysavsani07/math-metrix.git
synced 2025-08-06 15:11:40 +08:00
Merge branch 'master' of https://github.com/jaysavsani07/math-metrix
This commit is contained in:
BIN
assets/picture-puzzle-intro.gif
Normal file
BIN
assets/picture-puzzle-intro.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 263 KiB |
@ -74,12 +74,12 @@ class DashboardViewModel extends ChangeNotifier {
|
|||||||
KeyUtil.SquareRoot,
|
KeyUtil.SquareRoot,
|
||||||
getScoreboard("square_root")));
|
getScoreboard("square_root")));
|
||||||
list.add(GameCategory(
|
list.add(GameCategory(
|
||||||
10,
|
9,
|
||||||
"Picture Puzzle",
|
"Math Grid",
|
||||||
"picture_puzzle",
|
"math_machine",
|
||||||
GameCategoryType.PICTURE_PUZZLE,
|
GameCategoryType.MATH_MACHINE,
|
||||||
KeyUtil.PicturePuzzle,
|
KeyUtil.MathMachine,
|
||||||
getScoreboard("picture_puzzle")));
|
getScoreboard("math_machine")));
|
||||||
list.add(GameCategory(
|
list.add(GameCategory(
|
||||||
4,
|
4,
|
||||||
"Mathematical pairs",
|
"Mathematical pairs",
|
||||||
@ -96,15 +96,15 @@ class DashboardViewModel extends ChangeNotifier {
|
|||||||
GameCategoryType.MAGIC_TRIANGLE,
|
GameCategoryType.MAGIC_TRIANGLE,
|
||||||
KeyUtil.MagicTriangle,
|
KeyUtil.MagicTriangle,
|
||||||
getScoreboard("magic_tringle")));
|
getScoreboard("magic_tringle")));
|
||||||
list.add(GameCategory(
|
|
||||||
9,
|
|
||||||
"Math Grid",
|
|
||||||
"math_machine",
|
|
||||||
GameCategoryType.MATH_MACHINE,
|
|
||||||
KeyUtil.MathMachine,
|
|
||||||
getScoreboard("math_machine")));
|
|
||||||
list.add(GameCategory(
|
list.add(GameCategory(
|
||||||
10,
|
10,
|
||||||
|
"Picture Puzzle",
|
||||||
|
"picture_puzzle",
|
||||||
|
GameCategoryType.PICTURE_PUZZLE,
|
||||||
|
KeyUtil.PicturePuzzle,
|
||||||
|
getScoreboard("picture_puzzle")));
|
||||||
|
list.add(GameCategory(
|
||||||
|
11,
|
||||||
"Number Pyramid",
|
"Number Pyramid",
|
||||||
"number_pyramid",
|
"number_pyramid",
|
||||||
GameCategoryType.NUMBER_PYRAMID,
|
GameCategoryType.NUMBER_PYRAMID,
|
||||||
|
@ -89,8 +89,6 @@ class NumberPyramidProvider with ChangeNotifier {
|
|||||||
_currentState.list.where((cell) => cell.text.isNotEmpty);
|
_currentState.list.where((cell) => cell.text.isNotEmpty);
|
||||||
|
|
||||||
if (value == "DONE") {
|
if (value == "DONE") {
|
||||||
print("cell with values ${listOfCellWithValues.length}");
|
|
||||||
print("remaining cell ${_currentState.remainingCell}");
|
|
||||||
if (listOfCellWithValues.length == _currentState.remainingCell) {
|
if (listOfCellWithValues.length == _currentState.remainingCell) {
|
||||||
checkCorrectValues();
|
checkCorrectValues();
|
||||||
return;
|
return;
|
||||||
@ -132,12 +130,9 @@ class NumberPyramidProvider with ChangeNotifier {
|
|||||||
}
|
}
|
||||||
var correctVal = _currentState.list.where((cell) => cell.isCorrect == true);
|
var correctVal = _currentState.list.where((cell) => cell.isCorrect == true);
|
||||||
|
|
||||||
print("correct val ${correctVal.length}");
|
|
||||||
|
|
||||||
if (correctVal.length == _currentState.remainingCell) {
|
if (correctVal.length == _currentState.remainingCell) {
|
||||||
_index = _index + 1;
|
_index = _index + 1;
|
||||||
_currentState = _list[_index];
|
_currentState = _list[_index];
|
||||||
|
|
||||||
currentScore = currentScore + ScoreUtil.numberPyramidScore;
|
currentScore = currentScore + ScoreUtil.numberPyramidScore;
|
||||||
if (!timeOut) {
|
if (!timeOut) {
|
||||||
restartTimer();
|
restartTimer();
|
||||||
@ -153,7 +148,6 @@ class NumberPyramidProvider with ChangeNotifier {
|
|||||||
.take(TimeUtil.numPyramidTimeOut - (levelWiseTimer))
|
.take(TimeUtil.numPyramidTimeOut - (levelWiseTimer))
|
||||||
.listen((time) {
|
.listen((time) {
|
||||||
_time = time;
|
_time = time;
|
||||||
print("time $_time");
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}, onDone: () {
|
}, onDone: () {
|
||||||
this._timeOut = true;
|
this._timeOut = true;
|
||||||
|
@ -97,11 +97,11 @@ ${ScoreUtil.mathMachineScore.toInt()} for each correct equation
|
|||||||
case GameCategoryType.PICTURE_PUZZLE:
|
case GameCategoryType.PICTURE_PUZZLE:
|
||||||
return GameInfoDialog(
|
return GameInfoDialog(
|
||||||
title: "Picture Puzzle",
|
title: "Picture Puzzle",
|
||||||
image: "assets/math-machine-intro.gif",
|
image: "assets/picture-puzzle-intro.gif",
|
||||||
dec:
|
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:
|
case GameCategoryType.NUMBER_PYRAMID:
|
||||||
// TODO: Handle this case.
|
// TODO: Handle this case.
|
||||||
|
@ -36,7 +36,6 @@ class NumberPyramidDataProvider {
|
|||||||
[6, 7, 12, 14, 15, 16, 17],
|
[6, 7, 12, 14, 15, 16, 17],
|
||||||
[18, 19, 20, 21, 17, 7, 6],
|
[18, 19, 20, 21, 17, 7, 6],
|
||||||
[2, 3, 7, 8, 11, 12, 14],
|
[2, 3, 7, 8, 11, 12, 14],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
static List<NumberPyramidModel> getPyramidDataList(int level) {
|
static List<NumberPyramidModel> getPyramidDataList(int level) {
|
||||||
|
@ -19,7 +19,7 @@ class TimeUtil {
|
|||||||
static int magicTriangleTimeOut = 60;
|
static int magicTriangleTimeOut = 60;
|
||||||
static int mathMachineTimeOut = 120;
|
static int mathMachineTimeOut = 120;
|
||||||
|
|
||||||
static int picturePuzzleTimeOut = 300;
|
static int picturePuzzleTimeOut = 90;
|
||||||
static int numPyramidTimeOut = 120;
|
static int numPyramidTimeOut = 120;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,7 @@ flutter:
|
|||||||
- sqroot-intro.gif
|
- sqroot-intro.gif
|
||||||
- whats-the-sign-intro.gif
|
- whats-the-sign-intro.gif
|
||||||
- num-pyramid.gif
|
- num-pyramid.gif
|
||||||
|
- picture-puzzle-intro.gif
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
|
|
||||||
# An image asset can refer to one or more resolution-specific "variants", see
|
# An image asset can refer to one or more resolution-specific "variants", see
|
||||||
|
Reference in New Issue
Block a user