Closed dbuenzli closed 10 years ago
Btw. didn't include scoring because that would complicate rendering a bit (non-square rendering surface + layout, as doing with a div, would entail we'd need to use the js_of_ocaml
syntax extension which we don't use at all). If you really want it I can put it, but I think that since this is for education it's better to keep things simple. (Same can be said with game over/restart game which is not really polished).
Oh and since I'm a very bad gamer I never managed to finish the game, but I saw the "You win!" overlay in my cheat mode.
This looks excellent now. It looks absolutely fine for me on Firefox.
The game logic also now seems to be almost completely correct: the only thing slightly off is the odds of a 4 square showing up, which should be 1/10.
It looks very nice indeed!
Ok to merge?
Yes !
The result can be seen here. Don't forget to reload the page.
The animation is quite smooth in chrome but it seems that in FF and Safari it is a little bit choppy. Maybe the code is too functional (there are no assignment and/or mutation at all in code of the whole game) for JavaScript's engines.