summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js3
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/highscores/scores.php5
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/samegame.qml2
3 files changed, 4 insertions, 6 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
index f88b428..a905f7d 100755
--- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
+++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js
@@ -48,6 +48,8 @@ function initBoard()
createBlock(column,row);
}
}
+
+ timer = new Date();
}
var fillFound;//Set after a floodFill call to the number of tiles found
@@ -150,7 +152,6 @@ function victoryCheck()
if(deservesBonus || !(floodMoveCheck(0,maxRow-1, -1))){
timer = new Date() - timer;
nameInputDialog.show("You won! Please enter your name: ");
- //dialog.show("Game Over. Your score is " + gameCanvas.score);
}
}
diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php b/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php
index 3cceb2d..daf480e 100755
--- a/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php
+++ b/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php
@@ -8,10 +8,7 @@
$time = $_POST["time"];
if($name == "")
$name = "Anonymous";
- //if($grid != "10x10"){
- //Need a standard, so as to reject others?
- //}
- $file = fopen("score_data.xml", "a"); #It's XML. Happy?
+ $file = fopen("score_data.xml", "a");
$ret = fwrite($file, "<record><score>". $score . "</score><name>"
. $name . "</name><gridSize>" . $grid . "</gridSize><seconds>"
. $time . "</seconds></record>\n");
diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
index 59e0cef..fe35e3b 100644
--- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml
@@ -46,7 +46,7 @@ Rectangle {
id: editor
onAccepted: {
if(nameInputDialog.opacity==1&&editor.text!="")
- saveHighScore(editor.text);
+ SameGame.saveHighScore(editor.text);
nameInputDialog.forceClose();
}
anchors.verticalCenter: parent.verticalCenter