Commit Graph

121 Commits

Author SHA1 Message Date
Andy Janata 526911bc0e Don't update the game list when it isn't visible (i.e. you're already in a game). The client will refresh it when the player leaves their game anyway. This will hopefully cut down on a lot of bandwidth usage -- that's a lot of data sent around whenever anybody joins or leaves any game, and nobody sees it. 2013-03-02 23:50:24 -08:00
Andy Janata ccca422b8c show game-related log messages in the game's log instead of the global log 2013-02-24 18:57:04 -08:00
Andy Janata 300e7e09b7 Fix up per-game chats so global chat still works. Fix graphical glitch with game chat tab. Make enter work in game chat box. Clear game chat log when joinging game. 2013-02-24 18:47:05 -08:00
Matt Mullins b1c8e52dd4 Remove the chat tab when leaving a game 2013-02-24 17:48:49 -08:00
Matt Mullins 9cbd699109 Display Per-game chat messages in the correct tab
Errors are displayed in all chat tabs, including the global chat and
all in-game chats.
2013-02-24 17:48:49 -08:00
Andy Janata b74aed03c1 make per-game chats resize with the window like global chat. 2013-02-23 14:32:00 -08:00
Matt Mullins d110b59b9c Create a new tab for game-specific chat.
Signed-off-by: Matt Mullins <mmullins@mmlx.us>
2013-02-23 14:18:22 -08:00
Matt Mullins 3183af0a45 Add generalized arguments to chatsubmit_click
These parameters are used as a closure, so that the generated handler knows
which game it is attached to.

Signed-off-by: Matt Mullins <mmullins@mmlx.us>
2013-02-23 14:18:18 -08:00
Matt Mullins 7b74529a2b Refactor chat button click-handler to be a closure.
This will support having multiple handlers, one per game, in the future.

Signed-off-by: Matt Mullins <mmullins@mmlx.us>
2013-02-23 14:18:13 -08:00
Matt Mullins 9594b542f6 Replace id= with class= for the chat panel.
This is in preparation to support multiple tabs, which will provide a
separate chat tab per running game.

Signed-off-by: Matt Mullins <mmullins@mmlx.us>
2013-02-23 14:18:07 -08:00
Andy Janata 22156e90ac add tabs, move user preferences to a tab, and fix the chat ui to fit the tab. it gets very bad at small window sizes though 2012-10-15 20:23:37 -07:00
Andy Janata 54974836c8 I don't like editing library files I'm pulling from elsewhere, but those JS errors in Eclipse were getting annoying. 2012-10-13 13:48:57 -07:00
Andy Janata de331e738a - User preferences. Can turn off (dis)connect messages except for kicks/bans (fixes #9), and can ignore chat from specific users (except admins). Also remembers the user's name. All of these are stored in js cookies.
- Update jQuery and jQuery Cookie plugin, and add jQuery UI.
2012-10-11 21:18:40 -07:00
Andy Janata c6c6feb49f Display non-passworded games before passworded games. Fixes #20. 2012-10-11 20:05:06 -07:00
Andy Janata 3b454c4552 Generate cah.config.js via a Servlet. Idea from d4472c1238/src/net/socialgamer/cah/servlets/JavascriptConfig.java 2012-10-11 19:49:16 -07:00
Andy Janata 86703070ec show brief welcome banner on nickbox screen 2012-09-09 22:08:24 -07:00
Andy Janata 38224cf81a Chat flood protection. Limits users to 5 messages per 15 seconds currently. 2012-08-28 23:00:47 -07: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 7cf9413861 - add card set support to the game itself
- add watermark field to cards to indicate what to display over the logo
- display said watermark
2012-07-07 15:01:33 -07:00
Andy Janata 7f8c2f9dbf fix eclipse warning 2012-07-07 14:05:44 -07:00
Andy Janata 5bba53ef7d client parses CardSet data the server sends it when connecting 2012-07-07 10:48:22 -07:00
Andy Janata 973f18ea80 return list of card sets during first load 2012-07-07 10:21:14 -07:00
Andy Janata bc4f0818f1 Fix the log in Opera. Fixes #5. 2012-03-22 23:38:18 -07:00
Andy Janata 21e0aea9a3 add button to display game options in middle of game. do not allow host to change options in middle of game (on client, server should check this too) 2012-03-18 21:38:24 -07:00
Andy Janata 315549d87f game passwords, and display more game information in the lobby list 2012-03-18 21:20:48 -07:00
Andy Janata a1c2bbce80 allow to choose between first version cards, second version cards, or all cards at once. 2012-03-17 20:17:32 -07:00
Andy Janata c6659b3abb display the total duration of the current play timer. will make it count later 2012-03-16 18:35:13 -07:00
Andy Janata 1237d4c8a2 move round cards up the z-order again 2012-03-16 18:34:20 -07:00
Andy Janata dd117f05d2 fix constants for test 2012-03-16 17:05:27 -07:00
Andy Janata f2b5f2b623 PYX, not PYZ, you idiot. 2012-03-16 17:00:01 -07:00
Andy Janata e0391b8d4e skip and kick idle players 2012-03-16 16:59:50 -07:00
Andy Janata 95fe597184 add intermission after judge leaves game. it looks weird, and acts a bit oddly, especially for the previous judge: they can pick a winner but it won't let them choose on the server. still I think this is better than the old way of just starting the next round immediately. 2012-03-15 23:43:43 -07:00
Andy Janata 27a58856d8 fix host options with the card set hidden 2012-03-15 20:19:24 -07:00
Andy Janata a6f1a139be game host can configure maximum players and score goal 2012-03-15 20:06:23 -07:00
Andy Janata a679a7a36c - confirm leaving game
- initial game options. it never displays it right now since it isn't done
2012-03-15 13:50:42 -07:00
Andy Janata 5fa3bf5ece confirm logging out 2012-03-15 13:50:24 -07:00
Andy Janata 2e0168e7ce Cards Against Humanity -> Pretend You're Xyzzy 2012-03-15 10:14:32 -07:00
Andy Janata 1b465bad8f fix the servlet mappings in web.xml. make everything uncachable. 2012-03-13 00:42:07 -07:00
Andy Janata 2931fb7492 add TODO about cards blanking when players join and leave game 2012-03-12 22:20:17 -07:00
Andy Janata add5386127 POSSIBLY BREAKING CHANGE: change all the over-the-wire Constant values to shorter things. 2012-03-12 21:06:35 -07:00
Andy Janata ae5bc1d594 fix some problems with using hard-coded strings instead of values from Constants 2012-03-12 21:05:43 -07:00
Andy Janata 2e62708ea6 change long poll server-side returning to 20+5 seconds, client-side timeout to 45 seconds, and ping checking to 45 seconds. this should hopefully helpe with people that just close the window.
increase the maximum number of messages returned per poll to 10 for no particular reason :)
2012-03-12 21:05:19 -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 2d42710270 don't send blank chats to the server 2012-03-12 19:49:36 -07:00
Andy Janata f9b6de36d0 jsdoc cleanup 2012-02-20 12:34:26 -08:00
Andy Janata 02e2715809 Don't overwrite displaying the last round's black card when a new black card is dealt, if we are looking at the last round's results. Fixes #4. 2012-02-20 11:59:47 -08:00
Andy Janata 3058cf9498 - the re-centering of "you are czar" hand overlay wasn't working, so I removed it.
- ability to show the last round. this updates as soon as a new round winner is selected, and is tracked entirely on the client
2012-02-07 19:30:30 -08:00
Andy Janata 89da813b28 refactor around the card resize code so it's only in one place 2012-02-07 17:06:23 -08:00
Andy Janata f4ef1b3521 make the hand card scaling use the same algorithm as the round cards, to prevent them from getting larger than 100% scale 2012-02-07 16:31:56 -08:00