diff --git a/src/activities/gletters/Gletters.qml b/src/activities/gletters/Gletters.qml --- a/src/activities/gletters/Gletters.qml +++ b/src/activities/gletters/Gletters.qml @@ -39,6 +39,8 @@ property string activityName: "gletters" + property bool useDataset: false + /* mode of the activity, "letter" (gletters) or "word" (wordsgame):*/ property string mode: "letter" diff --git a/src/activities/gletters/gletters.js b/src/activities/gletters/gletters.js --- a/src/activities/gletters/gletters.js +++ b/src/activities/gletters/gletters.js @@ -33,11 +33,11 @@ var currentSubLevel = 0; var level = null; var maxLevel = 0; -var maxSubLevel = 0; +var maxSubLevel = 0; // store number of falling elements for each level var items; var uppercaseOnly; var mode; - +var levelData; // array to store levelwords //speed calculations, common: var speed = 0; // how fast letters fall var fallSpeed = 0; // how often new letters are dropped @@ -125,11 +125,20 @@ // initialize level deleteWords(); level = items.wordlist.getLevelWordList(currentLevel + 1); + /* for smallnumbers2, maxSubLevel will take value of sublevels attribute from json which represent number of + falling elements in each level and for other activities it will be 0 here.*/ maxSubLevel = items.wordlist.getMaxSubLevel(currentLevel + 1); + levelData = new Array(); + + // for smallnumbers2 and smallnumbers activities levelData will contain random data, while for other activity it contains same data as level.words + if(items.ourActivity.useDataset === true) + setLevelData(); + else + levelData = level.words if (maxSubLevel == 0) { // If "sublevels" length is not set in wordlist, use the words length - maxSubLevel = level.words.length + maxSubLevel = levelData.length } items.score.numberOfSubLevels = maxSubLevel; setSpeed(); @@ -148,37 +157,38 @@ // first generate a map of needed letters var letters = new Array(); items.keyboard.shiftKey = false; - for (var i = 0; i < level.words.length; i++) { + for (var i = 0; i < levelData.length; i++) { if(mode ==='letter') { // The word is a letter, even if it has several chars (digraph) - var letter = level.words[i]; + var letter = levelData[i]; var isUpper = (letter == letter.toLocaleUpperCase()); - if (isUpper && letters.indexOf(letter.toLocaleLowerCase()) !== -1) + var isDigit = letter.toLocaleLowerCase() === letter.toLocaleUpperCase() + if (!isDigit && isUpper && letters.indexOf(letter.toLocaleLowerCase()) !== -1) items.keyboard.shiftKey = true; - else if (!isUpper && letters.indexOf(letter.toLocaleUpperCase()) !== -1) + else if (!isDigit && !isUpper && letters.indexOf(letter.toLocaleUpperCase()) !== -1) items.keyboard.shiftKey = true; else if (letters.indexOf(letter) === -1) - letters.push(level.words[i]); + letters.push(levelData[i]); } else { // We split each word in char to create the keyboard - for (var j = 0; j < level.words[i].length; j++) { - var letter = level.words[i].charAt(j); + for (var j = 0; j < levelData[i].length; j++) { + var letter = levelData[i].charAt(j); var isUpper = (letter == letter.toLocaleUpperCase()); if (isUpper && letters.indexOf(letter.toLocaleLowerCase()) !== -1) items.keyboard.shiftKey = true; else if (!isUpper && letters.indexOf(letter.toLocaleUpperCase()) !== -1) items.keyboard.shiftKey = true; else if (letters.indexOf(letter) === -1) - letters.push(level.words[i].charAt(j)); + letters.push(levelData[i].charAt(j)); } } } letters = GCompris.ApplicationInfo.localeSort(letters, items.locale); // generate layout from letter map var layout = new Array(); var row = 0; var offset = 0; - while (offset < letters.length-1) { + while (offset < letters.length) { var cols = letters.length <= 10 ? letters.length : (Math.ceil((letters.length-offset) / (3 - row))); layout[row] = new Array(); for (var j = 0; j < cols; j++) @@ -188,10 +198,50 @@ } items.keyboard.layout = layout; } - items.wordlist.initRandomWord(currentLevel + 1) + if(items.ourActivity.useDataset === true) + items.wordlist.randomWordList = levelData + else + items.wordlist.initRandomWord(currentLevel + 1) initSubLevel() } +// function to create array of random data +function setLevelData() { + + /* algorithm will add 50% of previous level elements to levelData and 50% times new 2 elements but we can't use + this for data size of 2 and 3 so handling them separately */ + if(level.words.length === 2){ + for(var i = 0; i < maxSubLevel; i++) + levelData.push(addNewElement()) + } else if(level.words.length === 3) { + for(var i = 0; i < maxSubLevel; i++) { + if(Math.floor(Math.random() * 5) < 1) // adds previous element with probability of 1/5 and rest two with 2/5 + levelData.push(level.words[1]); + else + levelData.push(addNewElement()) + } + } else { + for(var i = 0; i < maxSubLevel; i++) { + if(Math.floor(Math.random() * 2) == 0) + levelData.push(addNewElement()) + else { + // generate a random index for an element (excluding first and last element) to be added in levelData + var index = Math.floor(Math.random() * (level.words.length - 2)) +1; + levelData.push(level.words[index]) + } + } + } +} + +// function will return any one of new number which we aim to teach in this level +function addNewElement() { + // if generated random number is 0, it will return first element otherwise last + if(Math.floor(Math.random()*2) === 0) + return level.words[0]; + else + return level.words[level.words.length-1]; +} + function initSubLevel() { currentWord = null; if (currentSubLevel != 0) { diff --git a/src/activities/smallnumbers/ActivityInfo.qml b/src/activities/smallnumbers/ActivityInfo.qml --- a/src/activities/smallnumbers/ActivityInfo.qml +++ b/src/activities/smallnumbers/ActivityInfo.qml @@ -37,5 +37,5 @@ credit: "" section: "computer keyboard math numeration" createdInVersion: 0 - levels: "1,2,3" + levels: "1,2,3,4,5,6,7" } diff --git a/src/activities/smallnumbers/Smallnumbers.qml b/src/activities/smallnumbers/Smallnumbers.qml --- a/src/activities/smallnumbers/Smallnumbers.qml +++ b/src/activities/smallnumbers/Smallnumbers.qml @@ -29,6 +29,8 @@ id: activity mode: "letter" + activityName: "smallnumbers" + useDataset: true dataSetUrl: "qrc:/gcompris/src/activities/smallnumbers/resource/" configurationButtonVisible: false diff --git a/src/activities/smallnumbers/resource/1/Data.qml b/src/activities/smallnumbers/resource/1/Data.qml --- a/src/activities/smallnumbers/resource/1/Data.qml +++ b/src/activities/smallnumbers/resource/1/Data.qml @@ -21,34 +21,40 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dice up to 4") + objective: qsTr("Select a number on dice up to 3") difficulty: 1 data: [ { - "level" : "1", - "objective" : qsTr("Select the number on dice up to 2"), + "objective" : qsTr("Select the numbers 1 and 2"), + "sublevels" : "8", + "words" : [ + "1", + "2" + ] + }, + { + "objective" : qsTr("Select the number 3"), + "sublevels" : "6", "words" : [ - "1", - "2" - ] + "3", + "3" + ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dice up to 3"), + "objective" : qsTr("Select the number on dice from 2 to 3"), + "sublevels" : "8", "words" : [ - "1", "2", - "3", + "3" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dice up to 4"), + "objective" : qsTr("Select the number on dice from 1 to 3"), + "sublevels" : "10", "words" : [ "1", "2", - "3", - "4" + "3" ] } ] diff --git a/src/activities/smallnumbers/resource/2/Data.qml b/src/activities/smallnumbers/resource/2/Data.qml --- a/src/activities/smallnumbers/resource/2/Data.qml +++ b/src/activities/smallnumbers/resource/2/Data.qml @@ -21,53 +21,42 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dice up to 7") + objective: qsTr("Select a number on dice up to 4") difficulty: 2 data: [ { - "level" : "1", - "objective" : qsTr("Select the number on dice up to 4"), + "objective" : qsTr("Select the number 4"), + "sublevels" : "6", "words" : [ - "1", - "2", - "3", + "4", "4" - ] + ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dice up to 5"), + "objective" : qsTr("Select the number on dice from 3 to 4"), + "sublevels" : "8", "words" : [ - "1", - "2", "3", - "4", - "5" + "4" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dice up to 6"), + "objective" : qsTr("Select the number on dice from 2 to 4"), + "sublevels" : "10", "words" : [ - "1", "2", "3", - "4", - "5", - "6" + "4" ] }, { - "level" : "4", - "objective" : qsTr("Select the number on dice up to 7"), + "objective" : qsTr("Select the number on dice from 1 to 4"), + "sublevels" : "12", "words" : [ "1", "2", "3", - "4", - "5", - "6", - "7" + "4" ] } ] diff --git a/src/activities/smallnumbers/resource/3/Data.qml b/src/activities/smallnumbers/resource/3/Data.qml --- a/src/activities/smallnumbers/resource/3/Data.qml +++ b/src/activities/smallnumbers/resource/3/Data.qml @@ -21,61 +21,53 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dice up to 9") - difficulty: 3 - data: [ + objective: qsTr("Select a number on dice up to 5") + difficulty: 2 + data: [ { - "level" : "1", - "objective" : qsTr("Select the number on dice up to 6"), + "objective" : qsTr("Select the number 5"), + "sublevels" : "6", "words" : [ - "1", - "2", - "3", - "4", "5", - "6" + "5" + ] + }, + { + "objective" : qsTr("Select the number on dice from 4 to 5"), + "sublevels" : "8", + "words" : [ + "4", + "5" ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dice up to 7"), + "objective" : qsTr("Select the number on dice from 3 to 5"), + "sublevels" : "10", "words" : [ - "1", - "2", "3", "4", - "5", - "6", - "7" + "5" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dice up to 8"), + "objective" : qsTr("Select the number on dice from 2 to 5"), + "sublevels" : "12", "words" : [ - "1", "2", "3", "4", - "5", - "6", - "7", - "8" + "5" ] }, { - "level" : "4", - "objective" : qsTr("Select the number on dice up to 9"), + "objective" : qsTr("Select the number on dice from 1 to 5"), + "sublevels" : "14", "words" : [ "1", "2", "3", "4", - "5", - "6", - "7", - "8", - "9" + "5" ] } ] diff --git a/src/activities/smallnumbers2/resource/3/Data.qml b/src/activities/smallnumbers/resource/4/Data.qml copy from src/activities/smallnumbers2/resource/3/Data.qml copy to src/activities/smallnumbers/resource/4/Data.qml --- a/src/activities/smallnumbers2/resource/3/Data.qml +++ b/src/activities/smallnumbers/resource/4/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2019 Akshay Kumar + * Copyright (C) 2020 Shubham Mishra * * Authors: - * Akshay Kumar + * Shubham Mishra * * 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 @@ -21,61 +21,65 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dominoes up to 9") - difficulty: 3 - data: [ + objective: qsTr("Select a number on dice up to 6") + difficulty: 3 + data: [ { - "level" : "1", - "objective" : qsTr("Select the number on dominoes up to 6"), + "objective" : qsTr("Select the number 6"), + "sublevels" : "6", + "words" : [ + "6", + "6" + ] + }, + { + "objective" : qsTr("Select the number on dice from 5 to 6"), + "sublevels" : "8", + "words" : [ + "5", + "6" + ] + }, + { + "objective" : qsTr("Select the number on dice from 4 to 6"), + "sublevels" : "10", "words" : [ - "1", - "2", - "3", "4", "5", "6" ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dominoes up to 7"), + "objective" : qsTr("Select the number on dice from 3 to 6"), + "sublevels" : "12", "words" : [ - "1", - "2", "3", "4", "5", - "6", - "7" + "6" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dominoes up to 8"), + "objective" : qsTr("Select the number on dice from 2 to 6"), + "sublevels" : "14", "words" : [ - "1", "2", "3", "4", "5", - "6", - "7", - "8" + "6" ] }, { - "level" : "4", - "objective" : qsTr("Select the number on dominoes up to 9"), + "objective" : qsTr("Select the number on dice from 1 to 6"), + "sublevels" : "16", "words" : [ "1", "2", "3", "4", "5", - "6", - "7", - "8", - "9" + "6" ] } ] diff --git a/src/activities/smallnumbers2/resource/3/Data.qml b/src/activities/smallnumbers/resource/5/Data.qml copy from src/activities/smallnumbers2/resource/3/Data.qml copy to src/activities/smallnumbers/resource/5/Data.qml --- a/src/activities/smallnumbers2/resource/3/Data.qml +++ b/src/activities/smallnumbers/resource/5/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2019 Akshay Kumar + * Copyright (C) 2020 Shubham Mishra * * Authors: - * Akshay Kumar + * Shubham Mishra * * 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 @@ -21,61 +21,78 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dominoes up to 9") - difficulty: 3 - data: [ + objective: qsTr("Select a number on dice up to 7") + difficulty: 3 + data: [ { - "level" : "1", - "objective" : qsTr("Select the number on dominoes up to 6"), + "objective" : qsTr("Select the number 7"), + "sublevels" : "6", + "words" : [ + "7", + "7" + ] + }, + { + "objective" : qsTr("Select the number on dice from 6 to 7"), + "sublevels" : "8", + "words" : [ + "6", + "7" + ] + }, + { + "objective" : qsTr("Select the number on dice from 5 to 7"), + "sublevels" : "10", + "words" : [ + "5", + "6", + "7" + ] + }, + { + "objective" : qsTr("Select the number on dice from 4 to 7"), + "sublevels" : "12", "words" : [ - "1", - "2", - "3", "4", "5", - "6" + "6", + "7" ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dominoes up to 7"), + "objective" : qsTr("Select the number on dice from 3 to 7"), + "sublevels" : "14", "words" : [ - "1", - "2", "3", "4", "5", "6", "7" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dominoes up to 8"), + "objective" : qsTr("Select the number on dice from 2 to 7"), + "sublevels" : "16", "words" : [ - "1", "2", "3", "4", "5", "6", - "7", - "8" + "7" ] }, { - "level" : "4", - "objective" : qsTr("Select the number on dominoes up to 9"), + "objective" : qsTr("Select the number on dice from 1 to 7"), + "sublevels" : "18", "words" : [ "1", "2", "3", "4", "5", "6", - "7", - "8", - "9" + "7" ] } ] diff --git a/src/activities/smallnumbers/resource/6/Data.qml b/src/activities/smallnumbers/resource/6/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/smallnumbers/resource/6/Data.qml @@ -0,0 +1,113 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Select a number on dice up to 8") + difficulty: 3 + data: [ + { + "objective" : qsTr("Select the number 8"), + "sublevels" : "6", + "words" : [ + "8", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dice from 7 to 8"), + "sublevels" : "8", + "words" : [ + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dice from 6 to 8"), + "sublevels" : "10", + "words" : [ + "6", + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dice from 5 to 8"), + "sublevels" : "12", + "words" : [ + "5", + "6", + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dice from 4 to 8"), + "sublevels" : "14", + "words" : [ + "4", + "5", + "6", + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dice from 3 to 8"), + "sublevels" : "16", + "words" : [ + "3", + "4", + "5", + "6", + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dice from 2 to 8"), + "sublevels" : "18", + "words" : [ + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dice from 1 to 8"), + "sublevels" : "20", + "words" : [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ] + } + ] +} diff --git a/src/activities/smallnumbers/resource/7/Data.qml b/src/activities/smallnumbers/resource/7/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/smallnumbers/resource/7/Data.qml @@ -0,0 +1,128 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Select a number on dice up to 9") + difficulty: 3 + data: [ + { + "objective" : qsTr("Select the number 9"), + "sublevels" : "6", + "words" : [ + "9", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dice from 8 to 9"), + "sublevels" : "8", + "words" : [ + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dice from 7 to 9"), + "sublevels" : "10", + "words" : [ + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dice from 6 to 9"), + "sublevels" : "12", + "words" : [ + "6", + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dice from 5 to 9"), + "sublevels" : "14", + "words" : [ + "5", + "6", + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dice from 4 to 9"), + "sublevels" : "16", + "words" : [ + "4", + "5", + "6", + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dice from 3 to 9"), + "sublevels" : "18", + "words" : [ + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dice from 2 to 9"), + "sublevels" : "20", + "words" : [ + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dice from 1 to 9"), + "sublevels" : "22", + "words" : [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ] + } + ] +} diff --git a/src/activities/smallnumbers2/ActivityInfo.qml b/src/activities/smallnumbers2/ActivityInfo.qml --- a/src/activities/smallnumbers2/ActivityInfo.qml +++ b/src/activities/smallnumbers2/ActivityInfo.qml @@ -37,5 +37,5 @@ credit: "" section: "math numeration" createdInVersion: 0 - levels: "1,2,3" + levels: "1,2,3,4,5,6,7" } diff --git a/src/activities/smallnumbers2/Smallnumbers2.qml b/src/activities/smallnumbers2/Smallnumbers2.qml --- a/src/activities/smallnumbers2/Smallnumbers2.qml +++ b/src/activities/smallnumbers2/Smallnumbers2.qml @@ -30,6 +30,7 @@ dataSetUrl: "qrc:/gcompris/src/activities/smallnumbers2/resource/" configurationButtonVisible: true activityName: "smallnumbers2" + useDataset: true property string dominoMode: "dot" function getMode() { diff --git a/src/activities/smallnumbers2/resource/1/Data.qml b/src/activities/smallnumbers2/resource/1/Data.qml --- a/src/activities/smallnumbers2/resource/1/Data.qml +++ b/src/activities/smallnumbers2/resource/1/Data.qml @@ -21,34 +21,40 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dominoes up to 4") + objective: qsTr("Select a number on dominoes up to 3") difficulty: 1 data: [ { - "level" : "1", - "objective" : qsTr("Select the number on dominoes up to 2"), + "objective" : qsTr("Select the numbers 1 and 2"), + "sublevels" : "8", + "words" : [ + "1", + "2" + ] + }, + { + "objective" : qsTr("Select the number 3"), + "sublevels" : "6", "words" : [ - "1", - "2" - ] + "3", + "3" + ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dominoes up to 3"), + "objective" : qsTr("Select the number on dominoes from 2 to 3"), + "sublevels" : "8", "words" : [ - "1", "2", - "3", + "3" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dominoes up to 4"), + "objective" : qsTr("Select the number on dominoes from 1 to 3"), + "sublevels" : "10", "words" : [ "1", "2", - "3", - "4" + "3" ] } ] diff --git a/src/activities/smallnumbers2/resource/2/Data.qml b/src/activities/smallnumbers2/resource/2/Data.qml --- a/src/activities/smallnumbers2/resource/2/Data.qml +++ b/src/activities/smallnumbers2/resource/2/Data.qml @@ -21,53 +21,42 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dominoes up to 7") + objective: qsTr("Select a number on dominoes up to 4") difficulty: 2 data: [ { - "level" : "1", - "objective" : qsTr("Select the number on dominoes up to 4"), + "objective" : qsTr("Select the number 4"), + "sublevels" : "6", "words" : [ - "1", - "2", - "3", + "4", "4" - ] + ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dominoes up to 5"), + "objective" : qsTr("Select the number on dominoes from 3 to 4"), + "sublevels" : "8", "words" : [ - "1", - "2", "3", - "4", - "5" + "4" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dominoes up to 6"), + "objective" : qsTr("Select the number on dominoes from 2 to 4"), + "sublevels" : "10", "words" : [ - "1", "2", "3", - "4", - "5", - "6" + "4" ] }, { - "level" : "4", - "objective" : qsTr("Select the number on dominoes up to 7"), + "objective" : qsTr("Select the number on dominoes from 1 to 4"), + "sublevels" : "12", "words" : [ "1", "2", "3", - "4", - "5", - "6", - "7" + "4" ] } ] diff --git a/src/activities/smallnumbers2/resource/3/Data.qml b/src/activities/smallnumbers2/resource/3/Data.qml --- a/src/activities/smallnumbers2/resource/3/Data.qml +++ b/src/activities/smallnumbers2/resource/3/Data.qml @@ -21,61 +21,53 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dominoes up to 9") - difficulty: 3 - data: [ + objective: qsTr("Select a number on dominoes up to 5") + difficulty: 2 + data: [ { - "level" : "1", - "objective" : qsTr("Select the number on dominoes up to 6"), + "objective" : qsTr("Select the number 5"), + "sublevels" : "6", "words" : [ - "1", - "2", - "3", - "4", "5", - "6" + "5" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 4 to 5"), + "sublevels" : "8", + "words" : [ + "4", + "5" ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dominoes up to 7"), + "objective" : qsTr("Select the number on dominoes from 3 to 5"), + "sublevels" : "10", "words" : [ - "1", - "2", "3", "4", - "5", - "6", - "7" + "5" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dominoes up to 8"), + "objective" : qsTr("Select the number on dominoes from 2 to 5"), + "sublevels" : "12", "words" : [ - "1", "2", "3", "4", - "5", - "6", - "7", - "8" + "5" ] }, { - "level" : "4", - "objective" : qsTr("Select the number on dominoes up to 9"), + "objective" : qsTr("Select the number on dominoes from 1 to 5"), + "sublevels" : "14", "words" : [ "1", "2", "3", "4", - "5", - "6", - "7", - "8", - "9" + "5" ] } ] diff --git a/src/activities/smallnumbers/resource/3/Data.qml b/src/activities/smallnumbers2/resource/4/Data.qml copy from src/activities/smallnumbers/resource/3/Data.qml copy to src/activities/smallnumbers2/resource/4/Data.qml --- a/src/activities/smallnumbers/resource/3/Data.qml +++ b/src/activities/smallnumbers2/resource/4/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2019 Akshay Kumar + * Copyright (C) 2020 Shubham Mishra * * Authors: - * Akshay Kumar + * Shubham Mishra * * 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 @@ -21,61 +21,65 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dice up to 9") - difficulty: 3 - data: [ + objective: qsTr("Select a number on dominoes up to 6") + difficulty: 3 + data: [ { - "level" : "1", - "objective" : qsTr("Select the number on dice up to 6"), + "objective" : qsTr("Select the number 6"), + "sublevels" : "6", + "words" : [ + "6", + "6" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 5 to 6"), + "sublevels" : "8", + "words" : [ + "5", + "6" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 4 to 6"), + "sublevels" : "10", "words" : [ - "1", - "2", - "3", "4", "5", "6" ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dice up to 7"), + "objective" : qsTr("Select the number on dominoes from 3 to 6"), + "sublevels" : "12", "words" : [ - "1", - "2", "3", "4", "5", - "6", - "7" + "6" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dice up to 8"), + "objective" : qsTr("Select the number on dominoes from 2 to 6"), + "sublevels" : "14", "words" : [ - "1", "2", "3", "4", "5", - "6", - "7", - "8" + "6" ] }, { - "level" : "4", - "objective" : qsTr("Select the number on dice up to 9"), + "objective" : qsTr("Select the number on dominoes from 1 to 6"), + "sublevels" : "16", "words" : [ "1", "2", "3", "4", "5", - "6", - "7", - "8", - "9" + "6" ] } ] diff --git a/src/activities/smallnumbers2/resource/3/Data.qml b/src/activities/smallnumbers2/resource/5/Data.qml copy from src/activities/smallnumbers2/resource/3/Data.qml copy to src/activities/smallnumbers2/resource/5/Data.qml --- a/src/activities/smallnumbers2/resource/3/Data.qml +++ b/src/activities/smallnumbers2/resource/5/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2019 Akshay Kumar + * Copyright (C) 2020 Shubham Mishra * * Authors: - * Akshay Kumar + * Shubham Mishra * * 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 @@ -21,61 +21,78 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dominoes up to 9") - difficulty: 3 - data: [ + objective: qsTr("Select a number on dominoes up to 7") + difficulty: 3 + data: [ { - "level" : "1", - "objective" : qsTr("Select the number on dominoes up to 6"), + "objective" : qsTr("Select the number 7"), + "sublevels" : "6", + "words" : [ + "7", + "7" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 6 to 7"), + "sublevels" : "8", + "words" : [ + "6", + "7" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 5 to 7"), + "sublevels" : "10", + "words" : [ + "5", + "6", + "7" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 4 to 7"), + "sublevels" : "12", "words" : [ - "1", - "2", - "3", "4", "5", - "6" + "6", + "7" ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dominoes up to 7"), + "objective" : qsTr("Select the number on dominoes from 3 to 7"), + "sublevels" : "14", "words" : [ - "1", - "2", "3", "4", "5", "6", "7" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dominoes up to 8"), + "objective" : qsTr("Select the number on dominoes from 2 to 7"), + "sublevels" : "16", "words" : [ - "1", "2", "3", "4", "5", "6", - "7", - "8" + "7" ] }, { - "level" : "4", - "objective" : qsTr("Select the number on dominoes up to 9"), + "objective" : qsTr("Select the number on dominoes from 1 to 7"), + "sublevels" : "18", "words" : [ "1", "2", "3", "4", "5", "6", - "7", - "8", - "9" + "7" ] } ] diff --git a/src/activities/smallnumbers2/resource/6/Data.qml b/src/activities/smallnumbers2/resource/6/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/smallnumbers2/resource/6/Data.qml @@ -0,0 +1,113 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Select a number on dominoes up to 8") + difficulty: 3 + data: [ + { + "objective" : qsTr("Select the number 8"), + "sublevels" : "6", + "words" : [ + "8", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 7 to 8"), + "sublevels" : "8", + "words" : [ + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 6 to 8"), + "sublevels" : "10", + "words" : [ + "6", + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 5 to 8"), + "sublevels" : "12", + "words" : [ + "5", + "6", + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 4 to 8"), + "sublevels" : "14", + "words" : [ + "4", + "5", + "6", + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 3 to 8"), + "sublevels" : "16", + "words" : [ + "3", + "4", + "5", + "6", + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 2 to 8"), + "sublevels" : "18", + "words" : [ + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 1 to 8"), + "sublevels" : "20", + "words" : [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8" + ] + } + ] +} diff --git a/src/activities/smallnumbers2/resource/7/Data.qml b/src/activities/smallnumbers2/resource/7/Data.qml new file mode 100644 --- /dev/null +++ b/src/activities/smallnumbers2/resource/7/Data.qml @@ -0,0 +1,128 @@ +/* GCompris - Data.qml + * + * Copyright (C) 2020 Shubham Mishra + * + * Authors: + * Shubham Mishra + * + * 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 "../../../../core" + +Dataset { + objective: qsTr("Select a number on dominoes up to 9") + difficulty: 3 + data: [ + { + "objective" : qsTr("Select the number 9"), + "sublevels" : "6", + "words" : [ + "9", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 8 to 9"), + "sublevels" : "8", + "words" : [ + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 7 to 9"), + "sublevels" : "10", + "words" : [ + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 6 to 9"), + "sublevels" : "12", + "words" : [ + "6", + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 5 to 9"), + "sublevels" : "14", + "words" : [ + "5", + "6", + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 4 to 9"), + "sublevels" : "16", + "words" : [ + "4", + "5", + "6", + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 3 to 9"), + "sublevels" : "18", + "words" : [ + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 2 to 9"), + "sublevels" : "20", + "words" : [ + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ] + }, + { + "objective" : qsTr("Select the number on dominoes from 1 to 9"), + "sublevels" : "22", + "words" : [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9" + ] + } + ] +}