Commit Graph

20 Commits

Author SHA1 Message Date
Andy Janata 8638dcadd4 Initial Cardcast support. Hard-coded to pull the Reject Pack for testing.
WARNING: This disables the JVM's SSL certificate checking, and only allows 'api.cardcastgame.com' when checking hosts. The proper solution would be to ensure that the JVM's trust store will accept that certificate.
2014-08-10 15:55:43 -07:00
Andy Janata de65ad2383 Don't load card sets until the game starts. Loading every card for every selected card set every time any option changed was a stupid idea. 2014-02-22 19:03:27 -08:00
Andy Janata 0e45c4f886 Switch to using a ScheduledThreadPoolExecutor instead of a Timer for scheduled tasks. This will allow 2 * CPU count threads to handle background tasks instead of using a single thread, which could cause the server to effectively die if a task gets stuck for some reason. This addresse the symptom of #89, but not the cause (which is yet to be determined). 2014-02-16 00:43:13 -08:00
Andy Janata fd3dce4c62 Reduce Hibernate Session lifetimes for games, which may be related to #89. Now, we're loading the cards out of the database when the game host tells us which card sets to use, and never touching the database again if the card sets never change.
Also, don't load every card in every card set when loading the card sets when a player connects to the server. We only need a count of the cards in the card set at that point.
2014-02-16 00:18:54 -08:00
Andy Janata 8221ab7b54 - Remove some pointless @Provides methods and .bind().toInstance().
- Use a single global Timer and schedule multiple TimerTasks on it. Moving to a ScheduledThreadPoolExecutor may be preferable as now all TimerTasks are serialized.
- Fix tests that were broken by changed behavior in 638fac780a (shows how often I run the few crappy tests I have...)
2013-12-01 09:53:47 +00:00
Andy Janata 7fccd69b15 Kicks and bans.
Admin chat in blue.
Chat commands (/names, /kick, /ban to start).
Close Hibernate session after loading card sets when a user connects -- Oops!
Games have their own Hibernate session for their duration, and this is used instead of a per-request session for loading card sets when changing options.
Fix changing game options without having a card set selected.
2012-08-20 22:41:06 -07:00
Andy Janata 90788982c0 chat messages from admin users show up in blue. admins are defined by IP address for now. 2012-08-20 20:03:52 -07:00
Andy Janata 16483c94b3 fix tests. I really need to run these more often, and write more. 2012-03-15 14:51:36 -07:00
Andy Janata e614a0da57 add a test for over-the-wire uniqueness for Constants, with an annotation to allow intentional duplication. 2012-03-12 20:18:24 -07:00
Andy Janata 88b68c87b6 comment ALL the files! 2012-02-06 14:00:24 -08:00
Andy Janata 4d5fddd293 add 2-clause bsd-style license to source files 2012-02-02 14:47:23 -08:00
Andy Janata fd7fd9b586 fix a test 2012-01-30 16:30:46 -08:00
Andy Janata 8b6d171d66 fix warnings 2012-01-20 19:11:39 -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 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 565c17b338 - add GameManager and test
- fix up Guice
2012-01-16 23:59:56 -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
Andy Janata 45e5705e56 move Type and DisconnectReason enums to a single file, preparing to do the same for all the scattered strings for operations 2012-01-12 13:35:53 -08:00
Andy Janata de1be43753 tweak GameTest 2012-01-12 13:13:51 -08:00
Andy Janata 0183bb0732 game data object with methods to add and remove players from the game 2012-01-12 13:09:01 -08:00