+ 2
How to write win function?
How to write win function in my fifteen game?
3 Answers
+ 2
function win () {
for(i=0;i<fifteenOrder.length - 1; i++) {
var a = fifteenOrder [i]
var o = o + a.toString();
var b = Order [i]
var p = p + b.toString();
}
if ( o == p ) {
alert("You win!");
}
}
+ 2
Cool.
0
thank you