Commit graph

82 commits

Author SHA1 Message Date
84fe6d228e Move game styling into the screen namespace 2019-12-14 18:24:28 +01:00
ef2c9cb3de Add an Ui module to provide operations on «widgets» — so far only the forms that can be enabled/disabled according to the state of the webSocket connection 2019-12-14 18:21:03 +01:00
d6b990b202 Group parts of UnitJS in a single file deployed in lib 2019-12-14 18:17:08 +01:00
932a7db389 Generalize CSS for listSelectors and move it to the right place 2019-12-12 22:20:28 +01:00
d496bca168 Keep separating hall and login, simplifying both, generalize listSelector and add one for games 2019-12-12 22:16:49 +01:00
0147ca0135 Forgot unused variable 2019-12-11 22:05:17 +01:00
8f3567660f Split login and main screen («hall») and make all those screens «submodules» of the screen module 2019-12-11 22:03:16 +01:00
d018c7e62c Start separating the login stage from selecting an opponent (still a *lot* of work to do, barely started) 2019-12-08 23:01:44 +01:00
019909ba61 Use new LogIn server message, make sure the user is logged in after sending them the welcome message (so that they don't see themselves in the room) and broadcast the new LogIn message (to everyone including the newcomer) 2019-12-08 23:00:29 +01:00
9e228c7e94 Handle WS reconnection in messaging module 2019-11-24 22:56:53 +01:00
11e33a95bb Add the correct imports for new session module 2019-11-24 22:56:00 +01:00
403ee2da92 Add start routine in session module picking the correct message and add an explicit loggedIn private boolean, rename the getter 2019-11-24 22:54:46 +01:00
0b834b4876 Sort initializers into separate init functions for DOM and WS events, stop passing session.loggedIn() around in refresh and setMode functions and send first message through session 2019-11-24 22:52:57 +01:00
cd517821c3 Add a module to wrap around localStorage and make it handy 2019-11-24 17:52:22 +01:00
e5ee61e848 Revert "Switch session logging out and relaying the log-out message to keep the sessionID accessible until the end" : the solution was to handle cases when the player wasn't logged in separately
This reverts commit 3bd2829cf2.
2019-11-20 18:27:41 +01:00
0d19c4f8dc Use the newest requirements in lib to define an ID prefix for the Session type 2019-11-20 18:26:23 +01:00
7a937355d2 Stop sending an error and simply ignore relay from an unauthenticated player because that should only happen on immediate logout for which there's nothing to do 2019-11-18 17:13:32 +01:00
3bd2829cf2 Switch session logging out and relaying the log-out message to keep the sessionID accessible until the end 2019-11-18 17:11:05 +01:00
a07285c7fc Remove deprecated comment 2019-11-18 17:09:12 +01:00
25bcf0631c Completely replace App.server by App.get, a function applying a projector to the server 2019-11-18 17:09:00 +01:00
fef08fd478 Merge branch 'main' into stateless-saltine 2019-11-17 17:07:21 +01:00
c024ea261c Make git ignore cabal by-products 2019-11-17 17:00:47 +01:00
bfb4837352 Separate PlayerIDs from SessionIDs and simplify protocol accordingly 2019-11-12 23:25:00 +01:00
50b24a0db6 Add a Player type back and slowly start separating SessionIDs (temporary) and PlayerID (permanent) 2019-11-05 18:14:24 +01:00
3aca8283e2 WIP: Still breaking everything, trying to replace PlayerID by SessionID now 2019-10-28 08:19:14 +01:00
a05d57fcea WIP : Start redesigning the protocol / informations kept on the server. Breaks pretty much everything 2019-10-23 17:47:18 +02:00
8c1902e6fd Remove all game storing from the server : a lot of remaining protocol operations are now meaningless and will require a huge redesign 2019-10-23 15:27:09 +02:00
d1eb8e957e Use PublicGame returned by the player and stop keeping track of the game's state internally 2019-10-22 18:10:29 +02:00
8147589377 Save latest game state received in client to send it back to server and make the client work again with the new message protocol 2019-10-19 09:31:58 +02:00
7804aeecef Use lighter syntax and adapt client code 2019-10-18 19:01:46 +02:00
55ec64fafc Use the new public field counting the turns and adapt the web
interface
2019-10-18 19:01:46 +02:00
8c107c0c2a Adapt code to new PublicGame data structure, output messages in the new format and break everything doing so 2019-10-18 19:01:46 +02:00
61d8616a5a WIP: Struggling with using the new public data types 2019-10-18 19:01:46 +02:00
0c5229ae6d Add a new Keys module to interface saltine and in the future implement keypair caching 2019-10-18 19:01:46 +02:00
13cd466e87 Use saltine package 2019-10-18 19:01:46 +02:00
b03c7fd087 Add a stateful «turnCard» variable like «selected» to fix the «double card» bug when choosing a card in the river after a Turned card step 2019-10-18 19:01:13 +02:00
6dfaaee385 Handle errors in a mor aesthetical way and allow to hide them (+fixes a bug caused by an implicit access to a DOM element by its id) 2019-10-18 17:55:50 +02:00
0abc020d13 Factorize code for turned cards and make sure selected hand cards are unselected after being played 2019-10-18 17:54:27 +02:00
c21a8f6512 Reorder modules alphabetically in imports 2019-10-13 22:00:35 +02:00
0778c4a675 Rename poorly named module Data to RW 2019-10-13 21:55:15 +02:00
e9205b67c7 Use the new APILanguage and simplify a lot of code 2019-08-24 23:29:40 +02:00
0f685c0a98 Add support for websocket even over SSL and wait for websocket to be properly open before trying to ping 2019-08-21 16:41:06 +02:00
ac114c16df Add debug facilities in messaging module toggled by GET parameter 2019-08-13 13:46:25 +02:00
b2253b81d6 Handle the end of games 2019-08-12 23:07:49 +02:00
66d2926635 Implement status handling to provide visual clue about the game state 2019-08-12 14:05:57 +02:00
70e8981eb4 Remove shameful commented-out code — not even in the right language ! 2019-01-15 21:39:29 +01:00
6b26ce72a1 Animate turns by showing the cards movements 2019-01-13 20:01:55 +01:00
2a9b162324 Support for base 4.12 2019-01-13 13:24:43 +01:00
1ace122876 Use latest changes in the lib to send a log of what happened during a turn 2019-01-08 22:48:18 +01:00
5c1ce754f5 Add a translation module and add a french translation 2019-01-01 12:57:27 +01:00