Commit Graph

13 Commits

Author SHA1 Message Date
Andy Janata 234b82afd2 - display black card in game
- display message indicating what the game is currently waiting for
- reload the black card when reloading page
- change the js constant generator to explain what the dummy things are for in the output
- add support for enums that need two user-visible values (specifically the game player state: the short message for the scoreboard and the long message telling the player what they need to do)
- hide the start game button after the game is started
- refactor game event longpoll handlers to use a helper that gets the game and reports an error if it can't
- game (should) reset to a lobby if it loses players to put it less than 3
2012-01-24 16:20:43 -08:00
Andy Janata 5915a3558d - reload hand after reloading page
- use transform animation in all browsers to reduce complexity :(
2012-01-23 23:02:59 -08:00
Andy Janata c73ce88646 deal cards to players when the game starts 2012-01-23 15:06:20 -08:00
Andy Janata eec3ad81ca - make currentGames be a list instead of a single object, just in case I do multiple games later
- add event handlers for leave and start game buttons
- leave game button works
2012-01-23 13:20:15 -08:00
Andy Janata 8e3c1372dc - fix formatting in css file
- add some templates for game lobbies
- client properly joins a game and shows the lobby!
- reconnect to in-progress game when refreshing page
2012-01-22 23:58:36 -08:00
Andy Janata 5bda9fd452 client can join games. doesn't load the game yet, which is the same thing that happens with creating a game. the same thing should happen for both cases.
reworked some tests to be able to hide a method from GameManager. part of this goal was to reduce unnecessary game refresh broadcasts if a client tried to create multiple games.
2012-01-18 16:42:18 -08:00
Andy Janata 979a9c4123 - create games
- list games
  - automatically refreshes list when game is created or destroyed
  - destroy games after removing all players (including at logout)
2012-01-17 21:58:09 -08:00
Andy Janata 40de91b5ac some work on the game list 2012-01-17 20:37:09 -08:00
Andy Janata 79f2f59716 - add game list ajax call
- skeleton for game lobby list
- fix ajax handlers to use the constants instead of literals for the ops
2012-01-17 17:48:21 -08:00
Andy Janata 76d9be8f1c more constants instead of immediate strings.
add a wrapper around the request parameters so we can use our enum values as the parameter names.
2012-01-16 16:28:21 -08:00
Andy Janata 61451105b0 do not return error messages, only return the error code and let the client look up the error message. this could eventually allow for localization of the error messages (but not the rest of the client yet) 2012-01-16 14:33:58 -08:00
Andy Janata 9a281cd38f use constants for long poll events, ajax request operation names, ajax response field names, and error codes 2012-01-12 21:36:31 -08:00
Andy Janata 8da78ebac7 move MessageType back inside QueuedMessage since the client doesn't need it
make converter to produce js enums out of java enums
make everything use the constants on both sides for ajax operation code and disconnect reason
move the handler update out of the subpackage that it generates into
make the enum update and handler update run at build
2012-01-12 20:05:39 -08:00