A client for the Yahoo! bingo contest. #complete
Go to file
Elf M. Sternberg 72dcd58784 Improve readability; fix end-state handler.
Fixed end-state handler to stop taking Ball messages when end-state
detected.  Looking at Yahoo's results board, failing at this could
result in the system looking as if I had poor win-state detection.

Fixed win-state detection to enclose the card matrix.  This makes the
coordinate tests look like it takes coordinate pairs, which is the
effect we want, improves readability, and reduces errors.
2013-12-04 12:17:48 -08:00
.gitignore Bingo client. 2013-12-03 17:19:13 -08:00
LICENSE Updated with Github info and Coffeescript dependency. 2013-12-03 23:54:14 -08:00
README.md Changed initial state to 'playing', so that we don't assume a broken connection is automatically a lost game. 2013-12-04 00:44:11 -08:00
bingo.coffee Improve readability; fix end-state handler. 2013-12-04 12:17:48 -08:00
package.json Removing underscore as a dependency. No longer hacking objects, just indexes. 2013-12-04 00:40:10 -08:00
package.yml Removing underscore as a dependency. No longer hacking objects, just indexes. 2013-12-04 00:40:10 -08:00

README.md

Yahoo's running this contest. Read about it here: http://yahoobingo.herokuapp.com/

This took me about 40 minutes, total. I was thinking about re-writing this in Bacon, but my Bacon is pretty raw. At best, I could propertize the cards to create a new card (i.e. a new state) every time a ball came in, but that seemed a little overwrought.

It was nice to have an opportunity to hack Coffee and Node again.

I don't know that I trust Yahoo's server. At least once I got back a "you lost" signal from the server. Since this client includes full playback of every game, I could see that I had clearly won. Unfortunately, my initial code assumed "lost" as the default state, so I couldn't see if maybe the 'won' signal was lost before receiving the disconnect. I've changed that to 'playing,' so we can see that condition now.