prout
This commit is contained in:
parent
f0f8da4a2d
commit
0fe42ab468
@ -1,44 +0,0 @@
|
||||
//VARIABLES
|
||||
var premier = 0;
|
||||
var deuxieme = 0;
|
||||
var troisième = 0;
|
||||
|
||||
var ligne;
|
||||
|
||||
var score = new Array("1ST", "2ND", "3RD");
|
||||
var premier = score["1ST"];
|
||||
var deuxieme = score["2ND"];
|
||||
var troisième = score["3RD"];
|
||||
|
||||
var tableau = {
|
||||
canvas: document.createElement("canvas"),
|
||||
start: function() {
|
||||
this.canvas.width = 200;
|
||||
this.canvas.height = 150;
|
||||
this.context = this.canvas.getContext("2d");
|
||||
document.body.insertBefore(this.canvas, document.body.childNodes[0]);
|
||||
this.frameNo = 0;
|
||||
this.interval = setInterval(updateGameArea, 20);
|
||||
},
|
||||
clear: function() {
|
||||
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
||||
}
|
||||
}
|
||||
|
||||
//METHODES
|
||||
function update(score) {
|
||||
if (score > premier)
|
||||
this.premier = score;
|
||||
else if (score > deuxieme)
|
||||
this.deuxieme = score;
|
||||
else if (score > troisième)
|
||||
this.troisième = score;
|
||||
}
|
||||
|
||||
function load() {
|
||||
alert("passe");
|
||||
update();
|
||||
for (var i = 0; i < score.lenght; i++)
|
||||
document.write(score[i] + score[score[i]] + < br / > );
|
||||
tableau.start();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user