diff --git a/src/activities/magic-hat-minus/ActivityInfo.qml b/src/activities/magic-hat-minus/ActivityInfo.qml --- a/src/activities/magic-hat-minus/ActivityInfo.qml +++ b/src/activities/magic-hat-minus/ActivityInfo.qml @@ -37,4 +37,5 @@ credit: "" section: "math arithmetic" createdInVersion: 0 + levels: "1,2,3,4,5,6" } diff --git a/src/activities/magic-hat-minus/MagicHat.qml b/src/activities/magic-hat-minus/MagicHat.qml --- a/src/activities/magic-hat-minus/MagicHat.qml +++ b/src/activities/magic-hat-minus/MagicHat.qml @@ -64,6 +64,8 @@ property alias background: background property GCSfx audioEffects: activity.audioEffects property alias bar: bar + property var levels: activity.datasetLoader.item.data + property int maxValue: activity.datasetLoader.item.maxValue property alias bonus: bonus property alias hat: theHat property alias introductionText: introText diff --git a/src/activities/magic-hat-minus/StarsBar.qml b/src/activities/magic-hat-minus/StarsBar.qml --- a/src/activities/magic-hat-minus/StarsBar.qml +++ b/src/activities/magic-hat-minus/StarsBar.qml @@ -21,14 +21,17 @@ */ import QtQuick 2.6 import "magic-hat.js" as Activity +import "../../core" Item { id: item height: starsSize property int barGroupIndex property int barIndex property int nbStarsOn: 0 property bool authorizeClick: false + property int coefficient: 1 + property bool coefficientVisible: false property int starsSize property string backgroundColor property string starsColor: "1" @@ -39,6 +42,17 @@ id: rowlayout height: item.height spacing: 5 + GCText { + id: text + visible: item.coefficientVisible + //: text displaying coefficient with which the set of stars is to be multiplied along with multiplication symbol. + text: qsTr("%1x").arg(item.coefficient) + fontSizeMode: Text.HorizontalFit + width: rowlayout.width / 10 + color: "white" + anchors.rightMargin: 20 + fontSize: tinySize + } Repeater { id: repeaterStars model: item.opacity == 1 ? 10 : 0 diff --git a/src/activities/magic-hat-minus/magic-hat.js b/src/activities/magic-hat-minus/magic-hat.js --- a/src/activities/magic-hat-minus/magic-hat.js +++ b/src/activities/magic-hat-minus/magic-hat.js @@ -24,21 +24,26 @@ var url = "qrc:/gcompris/src/activities/magic-hat-minus/resource/" var currentLevel -var numberOfLevel = 9 +var numberOfLevel var numberOfUserStars var items; var mode; var magicHat var numberOfStars var nbStarsToAddOrRemove var nbStarsToCount var animationCount +var questionCoefficients = [] +var maxStarSlots = 30 +var answerCoefficients = [] +var coefficientsNeeded = false function start(items_, mode_) { items = items_ mode = mode_ magicHat = items.hat currentLevel = 0 + numberOfLevel = items.levels.length initLevel() } @@ -59,53 +64,39 @@ } else { items.introductionText.visible = true } - - for(var j=0; j<3; j++) { + coefficientsNeeded = (items.maxValue / maxStarSlots <= 1) ? false : true + for(var j = 0; j < 3; j++) { items.repeatersList[0].itemAt(j).initStars() items.repeatersList[1].itemAt(j).initStars() items.repeatersList[2].itemAt(j).resetStars() } - - var maxValue = mode === "minus" ? 10 : 9 - switch(currentLevel) { - case 0: numberOfStars[0] = getRandomInt(2,4) - break; - case 1: numberOfStars[0] = getRandomInt(2,6) - break; - case 2: numberOfStars[0] = getRandomInt(2,maxValue) - break; - case 3: numberOfStars[0] = getRandomInt(2,5) - numberOfStars[1] = getRandomInt(2,5) - break; - case 4: numberOfStars[0] = getRandomInt(2,8) - numberOfStars[1] = getRandomInt(2,8) - break; - case 5: numberOfStars[0] = getRandomInt(2,maxValue) - numberOfStars[1] = getRandomInt(2,maxValue) - break; - case 6: numberOfStars[0] = getRandomInt(2,4) - numberOfStars[1] = getRandomInt(2,4) - numberOfStars[2] = getRandomInt(2,4) - break; - case 7: numberOfStars[0] = getRandomInt(2,6) - numberOfStars[1] = getRandomInt(2,6) - numberOfStars[2] = getRandomInt(2,6) - break; - case 8: numberOfStars[0] = getRandomInt(2,8) - numberOfStars[1] = getRandomInt(2,8) - numberOfStars[2] = getRandomInt(2,8) - break; - case 9: numberOfStars[0] = getRandomInt(2,maxValue) - numberOfStars[1] = getRandomInt(2,maxValue) - numberOfStars[2] = getRandomInt(2,maxValue) - break; + if(!coefficientsNeeded) { + questionCoefficients[0] = questionCoefficients[1] = questionCoefficients[2] = 1; + answerCoefficients[0] = answerCoefficients[1] = answerCoefficients[2] = 1; + setCoefficientVisibility(false) + setWantedColor() + } else { + for(var i = 0; i < 3; i++) + questionCoefficients[i] = Math.round(items.levels[currentLevel].maxStars[i] / 10); + answerCoefficients[0] = items.maxValue / 100; + answerCoefficients[1] = items.maxValue / 20; + answerCoefficients[2] = items.maxValue / 10; + setCoefficientVisibility(true) + setWantedColor("1") } + var subtractor = (mode === "minus") ? 0 : 1 + numberOfStars[0] = (items.levels[currentLevel].maxStars[0] > 0) ? getRandomInt(items.levels[currentLevel].minStars[0], (items.levels[currentLevel].maxStars[0] / questionCoefficients[0]) - subtractor) : 0 + numberOfStars[1] = (items.levels[currentLevel].maxStars[1] > 0) ? getRandomInt(items.levels[currentLevel].minStars[1], (items.levels[currentLevel].maxStars[1] / questionCoefficients[1]) - subtractor) : 0 + numberOfStars[2] = (items.levels[currentLevel].maxStars[2] > 0) ? getRandomInt(items.levels[currentLevel].minStars[2], (items.levels[currentLevel].maxStars[2] / questionCoefficients[2]) - subtractor) : 0 for(var i=0; i<3; i++) { items.repeatersList[0].itemAt(i).nbStarsOn = numberOfStars[i] + items.repeatersList[0].itemAt(i).coefficient = questionCoefficients[i] items.repeatersList[1].itemAt(i).nbStarsOn = 0 + items.repeatersList[1].itemAt(i).coefficient = questionCoefficients[i] items.repeatersList[2].itemAt(i).nbStarsOn = 0 items.repeatersList[2].itemAt(i).authorizeClick = false + items.repeatersList[2].itemAt(i).coefficient = answerCoefficients[i] if(numberOfStars[i] > 0) { items.repeatersList[0].itemAt(i).opacity = 1 items.repeatersList[1].itemAt(i).opacity = 1 @@ -123,32 +114,62 @@ } if(mode === "minus") { - for(var i=0; i<3; i++) { + for(var i = 0; i < 3; i++) { nbStarsToCount[i] = numberOfStars[i] - nbStarsToAddOrRemove[i] items.repeatersList[1].itemAt(i).nbStarsOn = 0 } } else { - for(var i=0; i<3; i++) { + for(var i = 0; i < 3; i++) { nbStarsToCount[i] = numberOfStars[i]+nbStarsToAddOrRemove[i] items.repeatersList[1].itemAt(i).nbStarsOn = nbStarsToAddOrRemove[i] } } } +function setCoefficientVisibility(visibility) { + for(var i = 0; i < 3; i++) { + for(var j = 0; j < 3; j++) { + items.repeatersList[j].itemAt(i).coefficientVisible = visibility + items.repeatersList[j].itemAt(i).maxRange = items.maxValue.toString() + } + } +} + +function setWantedColor(colorValue) { + if(colorValue != null) { + for(var i = 0; i < 3; i++) { + for(var j = 0; j < 3; j++) { + items.repeatersList[j].itemAt(i).starsColor = colorValue + } + } + } +} + function userClickedAStar(barIndex,state) { if(state) numberOfUserStars[barIndex]++ else numberOfUserStars[barIndex]-- } function verifyAnswer() { - if(numberOfUserStars[0] === nbStarsToCount[0] && - numberOfUserStars[1] === nbStarsToCount[1] && - numberOfUserStars[2] === nbStarsToCount[2]) { - items.bonus.good("flower") + if(items.maxValue / maxStarSlots <= 1) { + if(numberOfUserStars[0] === nbStarsToCount[0] && + numberOfUserStars[1] === nbStarsToCount[1] && + numberOfUserStars[2] === nbStarsToCount[2]) { + items.bonus.good("flower") + } else { + items.bonus.bad("flower") + } } else { - items.bonus.bad("flower") + var starsCalculatedByUser = numberOfUserStars[0] * answerCoefficients[0] + numberOfUserStars[1] * answerCoefficients[1] + + numberOfUserStars[2] * answerCoefficients[2]; + var actualNumberOfStars = nbStarsToCount[0] * questionCoefficients[0] + nbStarsToCount[1] * questionCoefficients[1] + + nbStarsToCount[2] * questionCoefficients[2]; + if(starsCalculatedByUser == actualNumberOfStars) + items.bonus.good("flower") + else + items.bonus.bad("flower") } } @@ -171,21 +192,21 @@ items.introductionText.visible = false } - for(var j=0; j<3; j++) { + for(var j = 0; j < 3; j++) { items.repeatersList[0].itemAt(j).moveStars() } } function moveBackMinusStars() { - for(var j=0; j<3; j++) { + for(var j = 0; j < 3; j++) { items.repeatersList[0].itemAt(j). moveBackMinusStars(items.repeatersList[1].itemAt(j), nbStarsToAddOrRemove[j]) } } function movePlusStars() { - for(var j=0; j<3; j++) { + for(var j = 0; j < 3; j++) { items.repeatersList[1].itemAt(j).moveStars() } } @@ -219,7 +240,7 @@ } function userGuessNumberState() { - for(var i=0; i<3; i++) { + for(var i = 0; i < 3; i++) { if(numberOfStars[i] + nbStarsToAddOrRemove[i]) items.repeatersList[2].itemAt(i).authorizeClick = true } diff --git a/src/activities/magic-hat-minus/resource/1/Data.qml b/src/activities/magic-hat-minus/resource/1/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-minus/resource/1/Data.qml @@ -0,0 +1,46 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate remaining stars up to 5") + difficulty: 1 + property int maxValue: 10 + data: [ + { + "level" : "1", + "minStars" : [2, 0, 0], + "maxStars" : [3, 0, 0] + }, + { + "level" : "2", + "minStars" : [2, 0, 0], + "maxStars" : [4, 0, 0] + }, + { + "level" : "3", + "minStars" : [2, 0, 0], + "maxStars" : [5, 0, 0] + } + ] +} diff --git a/src/activities/magic-hat-minus/resource/2/Data.qml b/src/activities/magic-hat-minus/resource/2/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-minus/resource/2/Data.qml @@ -0,0 +1,66 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate remaining stars up to 10") + difficulty: 2 + property int maxValue: 10 + data: [ + { + "level" : "1", + "minStars" : [2, 0, 0], + "maxStars" : [3, 0, 0] + }, + { + "level" : "2", + "minStars" : [2, 0, 0], + "maxStars" : [5, 0, 0] + }, + { + "level" : "3", + "minStars" : [2, 0, 0], + "maxStars" : [6, 0, 0] + }, + { + "level" : "4", + "minStars" : [2, 0, 0], + "maxStars" : [7, 0, 0] + }, + { + "level" : "5", + "minStars" : [2, 0, 0], + "maxStars" : [8, 0, 0] + }, + { + "level" : "6", + "minStars" : [2, 0, 0], + "maxStars" : [9, 0, 0] + }, + { + "level" : "7", + "minStars" : [2, 0, 0], + "maxStars" : [10, 0, 0] + } + ] +} diff --git a/src/activities/magic-hat-minus/resource/3/Data.qml b/src/activities/magic-hat-minus/resource/3/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-minus/resource/3/Data.qml @@ -0,0 +1,61 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate remaining stars up to 30") + difficulty: 3 + property int maxValue: 10 + data: [ + { + "level" : "1", + "minStars" : [2, 0, 0], + "maxStars" : [5, 0, 0] + }, + { + "level" : "2", + "minStars" : [2, 0, 0], + "maxStars" : [10, 0, 0] + }, + { + "level" : "3", + "minStars" : [2, 2, 0], + "maxStars" : [8, 8, 0] + }, + { + "level" : "4", + "minStars" : [2, 2, 0], + "maxStars" : [10, 10, 0] + }, + { + "level" : "5", + "minStars" : [2, 2, 2], + "maxStars" : [9, 9, 7] + }, + { + "level" : "6", + "minStars" : [2, 2, 2], + "maxStars" : [10, 10, 10] + } + ] +} diff --git a/src/activities/magic-hat-minus/resource/4/Data.qml b/src/activities/magic-hat-minus/resource/4/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-minus/resource/4/Data.qml @@ -0,0 +1,56 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate remaining stars up to 100 with coefficients") + difficulty: 4 + property int maxValue: 100 + data: [ + { + "level" : "1", + "minStars" : [2, 2, 0], + "maxStars" : [20, 10, 0] + }, + { + "level" : "2", + "minStars" : [2, 2, 2], + "maxStars" : [20, 20, 10] + }, + { + "level" : "3", + "minStars" : [2, 2, 2], + "maxStars" : [20, 20, 20] + }, + { + "level" : "4", + "minStars" : [2, 2, 2], + "maxStars" : [30, 30, 20] + }, + { + "level" : "5", + "minStars" : [2, 2, 2], + "maxStars" : [40, 40, 20] + } + ] +} diff --git a/src/activities/magic-hat-minus/resource/5/Data.qml b/src/activities/magic-hat-minus/resource/5/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-minus/resource/5/Data.qml @@ -0,0 +1,56 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate remaining stars up to 1000 with coefficients") + difficulty: 5 + property int maxValue: 1000 + data: [ + { + "level" : "1", + "minStars" : [2, 0, 0], + "maxStars" : [100, 0, 0] + }, + { + "level" : "2", + "minStars" : [2, 2, 0], + "maxStars" : [100, 100, 0] + }, + { + "level" : "3", + "minStars" : [2, 2, 2], + "maxStars" : [200, 200, 100] + }, + { + "level" : "4", + "minStars" : [2, 2, 2], + "maxStars" : [300, 300, 100] + }, + { + "level" : "5", + "minStars" : [2, 2, 2], + "maxStars" : [400, 400, 200] + } + ] +} diff --git a/src/activities/magic-hat-minus/resource/6/Data.qml b/src/activities/magic-hat-minus/resource/6/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-minus/resource/6/Data.qml @@ -0,0 +1,56 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate remaining stars up to 1000 with coefficients") + difficulty: 6 + property int maxValue: 10000 + data: [ + { + "level" : "1", + "minStars" : [2, 2, 0], + "maxStars" : [500, 500, 0] + }, + { + "level" : "2", + "minStars" : [2, 2, 0], + "maxStars" : [1000, 1000, 0] + }, + { + "level" : "3", + "minStars" : [2, 2, 2], + "maxStars" : [2000, 2000, 1000] + }, + { + "level" : "4", + "minStars" : [2, 2, 2], + "maxStars" : [3000, 3000, 1000] + }, + { + "level" : "5", + "minStars" : [2, 2, 2], + "maxStars" : [4000, 4000, 2000] + } + ] +} diff --git a/src/activities/magic-hat-plus/ActivityInfo.qml b/src/activities/magic-hat-plus/ActivityInfo.qml --- a/src/activities/magic-hat-plus/ActivityInfo.qml +++ b/src/activities/magic-hat-plus/ActivityInfo.qml @@ -37,4 +37,5 @@ credit: "" section: "math arithmetic" createdInVersion: 0 + levels: "1,2,3,4,5,6" } diff --git a/src/activities/magic-hat-plus/resource/1/Data.qml b/src/activities/magic-hat-plus/resource/1/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-plus/resource/1/Data.qml @@ -0,0 +1,46 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate total stars up to 5") + difficulty: 1 + property int maxValue: 5 + data: [ + { + "level" : "1", + "minStars" : [2, 0, 0], + "maxStars" : [3, 0, 0] + }, + { + "level" : "2", + "minStars" : [2, 0, 0], + "maxStars" : [4, 0, 0] + }, + { + "level" : "3", + "minStars" : [2, 0, 0], + "maxStars" : [5, 0, 0] + } + ] +} diff --git a/src/activities/magic-hat-plus/resource/2/Data.qml b/src/activities/magic-hat-plus/resource/2/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-plus/resource/2/Data.qml @@ -0,0 +1,66 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate total stars up to 10") + difficulty: 2 + property int maxValue: 10 + data: [ + { + "level" : "1", + "minStars" : [2, 0, 0], + "maxStars" : [3, 0, 0] + }, + { + "level" : "2", + "minStars" : [2, 0, 0], + "maxStars" : [4, 0, 0] + }, + { + "level" : "3", + "minStars" : [2, 0, 0], + "maxStars" : [5, 0, 0] + }, + { + "level" : "4", + "minStars" : [2, 0, 0], + "maxStars" : [6, 0, 0] + }, + { + "level" : "5", + "minStars" : [2, 0, 0], + "maxStars" : [7, 0, 0] + }, + { + "level" : "6", + "minStars" : [2, 0, 0], + "maxStars" : [8, 0, 0] + }, + { + "level" : "7", + "minStars" : [2, 0, 0], + "maxStars" : [9, 0, 0] + } + ] +} diff --git a/src/activities/magic-hat-plus/resource/3/Data.qml b/src/activities/magic-hat-plus/resource/3/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-plus/resource/3/Data.qml @@ -0,0 +1,61 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate total stars up to 30") + difficulty: 3 + property int maxValue: 30 + data: [ + { + "level" : "1", + "minStars" : [2, 0, 0], + "maxStars" : [5, 0, 0] + }, + { + "level" : "2", + "minStars" : [2, 2, 0], + "maxStars" : [7, 3, 0] + }, + { + "level" : "3", + "minStars" : [2, 2, 0], + "maxStars" : [8, 8, 0] + }, + { + "level" : "4", + "minStars" : [2, 2, 2], + "maxStars" : [8, 8, 4] + }, + { + "level" : "5", + "minStars" : [2, 2, 2], + "maxStars" : [9, 9, 7] + }, + { + "level" : "6", + "minStars" : [2, 2, 2], + "maxStars" : [9, 9, 9] + } + ] +} diff --git a/src/activities/magic-hat-plus/resource/4/Data.qml b/src/activities/magic-hat-plus/resource/4/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-plus/resource/4/Data.qml @@ -0,0 +1,56 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate total stars up to 100 with coefficients") + difficulty: 4 + property int maxValue: 100 + data: [ + { + "level" : "1", + "minStars" : [2, 2, 0], + "maxStars" : [20, 10, 0] + }, + { + "level" : "2", + "minStars" : [2, 2, 2], + "maxStars" : [20, 20, 10] + }, + { + "level" : "3", + "minStars" : [2, 2, 2], + "maxStars" : [20, 20, 20] + }, + { + "level" : "4", + "minStars" : [2, 2, 2], + "maxStars" : [30, 30, 20] + }, + { + "level" : "5", + "minStars" : [2, 2, 2], + "maxStars" : [40, 40, 20] + } + ] +} diff --git a/src/activities/magic-hat-plus/resource/5/Data.qml b/src/activities/magic-hat-plus/resource/5/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-plus/resource/5/Data.qml @@ -0,0 +1,56 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate total stars up to 1000 with coefficients") + difficulty: 5 + property int maxValue: 1000 + data: [ + { + "level" : "1", + "minStars" : [2, 0, 0], + "maxStars" : [100, 0, 0] + }, + { + "level" : "2", + "minStars" : [2, 2, 0], + "maxStars" : [100, 100, 0] + }, + { + "level" : "3", + "minStars" : [2, 2, 2], + "maxStars" : [200, 200, 100] + }, + { + "level" : "4", + "minStars" : [2, 2, 2], + "maxStars" : [300, 300, 100] + }, + { + "level" : "5", + "minStars" : [2, 2, 2], + "maxStars" : [400, 400, 200] + } + ] +} diff --git a/src/activities/magic-hat-plus/resource/6/Data.qml b/src/activities/magic-hat-plus/resource/6/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/magic-hat-plus/resource/6/Data.qml @@ -0,0 +1,56 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2019 Akshay Kumar + * + * Authors: + * Akshay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ +import QtQuick 2.6 +import GCompris 1.0 +import "../../../../core" + +Dataset { + objective: qsTr("Learn to calculate total stars up to 10000 with coefficients") + difficulty: 6 + property int maxValue: 10000 + data: [ + { + "level" : "1", + "minStars" : [2, 2, 0], + "maxStars" : [500, 500, 0] + }, + { + "level" : "2", + "minStars" : [2, 2, 0], + "maxStars" : [1000, 1000, 0] + }, + { + "level" : "3", + "minStars" : [2, 2, 2], + "maxStars" : [2000, 2000, 1000] + }, + { + "level" : "4", + "minStars" : [2, 2, 2], + "maxStars" : [3000, 3000, 1000] + }, + { + "level" : "5", + "minStars" : [2, 2, 2], + "maxStars" : [4000, 4000, 2000] + } + ] +}