r/programming • • Jul 25 '13

CoffeeScript's Scoping is Madness

http://donatstudios.com/CoffeeScript-Madness
207 Upvotes

315 comments sorted by

View all comments

Show parent comment

3

u/cashto Jul 26 '13

On that project? No.

It was essentially a multiplayer card game. The core of the program could be viewed as one big state machine. I did write some code so I could simulate the inputs of several players and see what pops out, but verification was done manually.

At some point I could see building a regression suite out of it (i.e., given a set of historical games, re-run the inputs and compare them against a known output). I could also see more targeted testing of edge-case scenarios that rarely come up in-game (e.g., two players try to play the same card in the same round -- only one should be allowed to, and it should be the person closest to the leader). At the moment the game rules (or at least, my understanding of them) are still in a state of flux, so I'd likely not see too much immediate benefit. It's also just a little personal project, so I haven't given it the whole nine yards.

The UI was done similarly -- at some places I would write code to simulate receiving certain events from the server, but it was never formalized.

End-to-end, I played numerous games against automatic random players.