diff --git a/src/activities/memory-math-add/ActivityInfo.qml b/src/activities/memory-math-add/ActivityInfo.qml index 058013c79..f3f419eae 100644 --- a/src/activities/memory-math-add/ActivityInfo.qml +++ b/src/activities/memory-math-add/ActivityInfo.qml @@ -1,43 +1,44 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * 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 GCompris 1.0 ActivityInfo { name: "memory-math-add/MemoryMathAdd.qml" difficulty: 3 icon: "memory-math-add/memory-math-add.svg" author: "JB BUTET <ashashiwa@gmail.com>" //: Activity title title: qsTr("Addition memory game") //: Help title description: qsTr("Turn the cards over to find two numbers which add up the same, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice adding up, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Addition") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an adding-up sum, or the answer to the sum. An adding-up sum looks like this: 2 + 2 = 4 The numbers on one side of the equals sign (=) have to be the same as the number on the other side. So 2 (1, 2) and 2 more (3, 4) makes 4. Count aloud when you work this out, and count on your fingers, because the more ways you do something, the better you remember it. You can also use blocks, or buttons, or anything you can count. If you have lots of brothers and sisters, you can count them! Or the kids in your class at school. Sing counting songs. Count lots of things, for practice, and you'll be very good at adding-up! In this game, these cards are hiding the two parts of an adding-up sum (also called an addition sum). You need to find the two parts of the sum, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole sum. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper sum. When you do that, both those cards disappear! When you've made them all disappear, found all the sums, you've won the game!") credit: "" section: "math memory arithmetic" createdInVersion: 0 + levels: "1,2,3,4,5,6,7,8,9,10" } diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/MemoryMathAdd.qml index 6cf207d79..e5db626d8 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/MemoryMathAdd.qml @@ -1,30 +1,28 @@ /* gcompris - MemoryMathAdd.qml * * Copyright (C) 2014 JB BUTET * * Authors: * Bruno Coudoin (GTK+ version) * JB BUTET (Qt Quick port) * * 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 "../memory" -import "memory-adddataset.js" as Dataset MemoryCommon { - dataset: Dataset.get() backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" } diff --git a/src/activities/memory-math-add/memory-adddataset.js b/src/activities/memory-math-add/memory-adddataset.js deleted file mode 100644 index 950ea0312..000000000 --- a/src/activities/memory-math-add/memory-adddataset.js +++ /dev/null @@ -1,77 +0,0 @@ -/* GCompris - * - * Copyright (C) 2014 Bruno Coudoin - * - * 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 "qrc:/gcompris/src/activities/memory/math_util.js" as Memory - -var memory_cards = [ - { // Level 1 - columns: 5, - rows: 2, - texts: Memory.getAddTable(1) - }, - { // Level 2 - columns: 5, - rows: 2, - texts: Memory.getAddTable(2) - }, - { // Level 3 - columns: 5, - rows: 2, - texts: Memory.getAddTable(3) - }, - { // Level 4 - columns: 5, - rows: 2, - texts: Memory.getAddTable(4) - }, - { // Level 5 - columns: 5, - rows: 2, - texts: Memory.getAddTable(5) - }, - { // Level 6 - columns: 5, - rows: 2, - texts: Memory.getAddTable(6) - }, - { // Level 7 - columns: 5, - rows: 2, - texts: Memory.getAddTable(7) - }, - { // Level 8 - columns: 5, - rows: 2, - texts: Memory.getAddTable(8) - }, - { // Level 9 - columns: 5, - rows: 2, - texts: Memory.getAddTable(9) - }, - { // Level 10 - columns: 5, - rows: 2, - texts: Memory.getAddTable(10) - } - ] - - -function get() { - return memory_cards -} diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/resource/1/Data.qml similarity index 54% copy from src/activities/memory-math-add/MemoryMathAdd.qml copy to src/activities/memory-math-add/resource/1/Data.qml index 6cf207d79..29f0eef7b 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/resource/1/Data.qml @@ -1,30 +1,36 @@ -/* gcompris - MemoryMathAdd.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-adddataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Find cards with equivalent quantities until 11.") + difficulty: 1 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getAddTable(1) + } + ] } diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/resource/10/Data.qml similarity index 54% copy from src/activities/memory-math-add/MemoryMathAdd.qml copy to src/activities/memory-math-add/resource/10/Data.qml index 6cf207d79..7779b3ebb 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/resource/10/Data.qml @@ -1,30 +1,36 @@ -/* gcompris - MemoryMathAdd.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-adddataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Find cards with equivalent quantities until 20.") + difficulty: 5 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getAddTable(10) + } + ] } diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/resource/2/Data.qml similarity index 54% copy from src/activities/memory-math-add/MemoryMathAdd.qml copy to src/activities/memory-math-add/resource/2/Data.qml index 6cf207d79..73c99a8f8 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/resource/2/Data.qml @@ -1,30 +1,36 @@ -/* gcompris - MemoryMathAdd.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-adddataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Find cards with equivalent quantities until 12.") + difficulty: 2 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getAddTable(2) + } + ] } diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/resource/3/Data.qml similarity index 54% copy from src/activities/memory-math-add/MemoryMathAdd.qml copy to src/activities/memory-math-add/resource/3/Data.qml index 6cf207d79..2d316c039 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/resource/3/Data.qml @@ -1,30 +1,36 @@ -/* gcompris - MemoryMathAdd.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-adddataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Find cards with equivalent quantities until 13.") + difficulty: 3 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getAddTable(3) + } + ] } diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/resource/4/Data.qml similarity index 54% copy from src/activities/memory-math-add/MemoryMathAdd.qml copy to src/activities/memory-math-add/resource/4/Data.qml index 6cf207d79..88cf1ed9c 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/resource/4/Data.qml @@ -1,30 +1,36 @@ -/* gcompris - MemoryMathAdd.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-adddataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Find cards with equivalent quantities until 14.") + difficulty: 3 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getAddTable(4) + } + ] } diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/resource/5/Data.qml similarity index 54% copy from src/activities/memory-math-add/MemoryMathAdd.qml copy to src/activities/memory-math-add/resource/5/Data.qml index 6cf207d79..fc1f84020 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/resource/5/Data.qml @@ -1,30 +1,36 @@ -/* gcompris - MemoryMathAdd.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-adddataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Find cards with equivalent quantities until 15.") + difficulty: 3 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getAddTable(5) + } + ] } diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/resource/6/Data.qml similarity index 54% copy from src/activities/memory-math-add/MemoryMathAdd.qml copy to src/activities/memory-math-add/resource/6/Data.qml index 6cf207d79..af68510a3 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/resource/6/Data.qml @@ -1,30 +1,36 @@ -/* gcompris - MemoryMathAdd.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-adddataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Find cards with equivalent quantities until 16.") + difficulty: 4 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getAddTable(6) + } + ] } diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/resource/7/Data.qml similarity index 54% copy from src/activities/memory-math-add/MemoryMathAdd.qml copy to src/activities/memory-math-add/resource/7/Data.qml index 6cf207d79..d451cbe5f 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/resource/7/Data.qml @@ -1,30 +1,36 @@ -/* gcompris - MemoryMathAdd.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-adddataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Find cards with equivalent quantities until 17.") + difficulty: 4 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getAddTable(7) + } + ] } diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/resource/8/Data.qml similarity index 54% copy from src/activities/memory-math-add/MemoryMathAdd.qml copy to src/activities/memory-math-add/resource/8/Data.qml index 6cf207d79..eacf03912 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/resource/8/Data.qml @@ -1,30 +1,36 @@ -/* gcompris - MemoryMathAdd.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-adddataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Find cards with equivalent quantities until 18.") + difficulty: 4 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getAddTable(8) + } + ] } diff --git a/src/activities/memory-math-add/MemoryMathAdd.qml b/src/activities/memory-math-add/resource/9/Data.qml similarity index 54% copy from src/activities/memory-math-add/MemoryMathAdd.qml copy to src/activities/memory-math-add/resource/9/Data.qml index 6cf207d79..a44ed3b14 100644 --- a/src/activities/memory-math-add/MemoryMathAdd.qml +++ b/src/activities/memory-math-add/resource/9/Data.qml @@ -1,30 +1,36 @@ -/* gcompris - MemoryMathAdd.qml +/* GCompris - Data.qml * - * Copyright (C) 2014 JB BUTET + * Copyright (C) 2020 Deepak Kumar * * Authors: - * Bruno Coudoin (GTK+ version) - * JB BUTET (Qt Quick port) + * Deepak 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 . + * along with this program; if not, see . */ -import QtQuick 2.6 -import "../memory" -import "memory-adddataset.js" as Dataset +import GCompris 1.0 +import "qrc:/gcompris/src/activities/memory/math_util.js" as Memory -MemoryCommon { - dataset: Dataset.get() - backgroundImg: "qrc:/gcompris/src/activities/memory/resource/background.svg" +Data { + objective: qsTr("Find cards with equivalent quantities until 19.") + difficulty: 5 + + data: [ + { // Level 1 + columns: 5, + rows: 2, + texts: Memory.getAddTable(9) + } + ] }