+ 2

How to write win function?

How to write win function in my fifteen game?

15th Jan 2018, 7:47 PM
Dmytro Kekukh
Dmytro Kekukh - avatar
3 Réponses
+ 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!"); } }
15th Jan 2018, 7:48 PM
Dmytro Kekukh
Dmytro Kekukh - avatar
+ 2
Cool.
15th Jan 2018, 11:11 PM
Oleksandr Stetsenko
Oleksandr  Stetsenko - avatar
0
thank you
16th Jan 2018, 4:32 PM
TarasM