Jesse D. McDonald
f3e2d2c7a4
add a 'badge' icon with link to current page with game ID
2020-04-16 21:30:38 -05:00
Jesse D. McDonald
d6ee83a36f
add a per-game Jitsi Meet link for voice/video chat
2020-04-16 01:28:46 -05:00
Jesse D. McDonald
cc083e4d52
add missing pieces so Chrome sees an installable PWA
2020-04-11 18:12:19 -05:00
Jesse D. McDonald
36d9a8654d
remove cb-in-check class when placing pieces
2020-04-05 20:48:36 -05:00
Jesse D. McDonald
a7df98a990
fix for prev_turn has no effect when mid-chain
2020-04-05 17:39:47 -05:00
Jesse D. McDonald
cba11ec0c8
highlight king when in check
2020-04-05 17:31:42 -05:00
Jesse D. McDonald
7c04b9ba09
performance improvements for determination of check
2020-04-05 17:25:06 -05:00
Jesse D. McDonald
accbc316ff
add an optional in-page notification sound
2020-04-05 17:24:22 -05:00
Jesse D. McDonald
e28ea59095
block castling out of check
2020-04-05 05:24:26 -05:00
Jesse D. McDonald
fcb14d489c
add ability to detect obvious check (chains of 6 moves or less)
2020-04-05 04:42:10 -05:00
Jesse D. McDonald
1a7728e53d
fix some quirks with the game select menu
2020-04-04 06:03:13 -05:00
Jesse D. McDonald
7ebea1d1fc
restructure data to limit indirect links; breaking change
...
I found that the game list was wiped out (again) and I suspect that the
issue was that some client pushed an update to the game list before
receiving the current data for the top-level object. That would have
caused it to create new objects for the game and metadata lists
containing only the single newly-created game and store links to them in
the 'games' and 'meta' fields of the top-level object. This data would
not be merged because the new objects have no connection to the original
objects which should have been linked from those fields. The top-level
object would be merged, but only to the extent of updating the links.
To fix this, I moved the 'meta' object to the top level with a fixed
identifier (UUID + '/meta'). This identifier _is_ the object's identity
("soul") so even if a client initializes it with an empty object the new
fields should be merged when syncing resumes. I removed the 'games'
object altogether, since the meta object keeps track of which game IDs
are available. Individual games are assigned "souls" based on their game
IDs (UUID + ('/game/' or '/meta/') + game ID). The resulting structure
looks like:
'UUID/meta': {
'12345abcde': <link to 'UUID/meta/12345abcde'>,
'3a2b5c7e1f': <link to 'UUID/meta/3a2b5c7e1f'>,
...
},
'UUID/meta/12345abcde': { ... darkName, lightName, moves, etc. ... },
'UUID/game/12345abcde': { 'board': 'JSON' },
'UUID/meta/3a2b5c7e1f': { ... darkName, lightName, moves, etc. ... },
'UUID/game/3a2b5c7e1f': { 'board': 'JSON' },
...
Besides being more resilient, this structure should also be more
performant since there are fewer links to traverse to access the game
data. So far in my admittedly limited testing I haven't seen any of the
syncronization issues that plagued the older version.
2020-04-04 05:24:59 -05:00
Jesse D. McDonald
b228f1f626
switch scanPath and legalMoves to return generators instead of arrays
2020-04-04 03:10:42 -05:00
Jesse D. McDonald
5f9ce09181
fix for syntax error (extension) function statement inside 'if'
2020-04-03 13:37:58 -05:00
Jesse D. McDonald
fe711991f5
store initial state as soon as a new game is created
2020-04-02 18:10:08 -05:00
Jesse D. McDonald
e1722cf589
fix remaining hard-coded paths & extend cache lifetimes with content hashes
2020-04-02 05:25:49 -05:00
Jesse D. McDonald
2e68c3b7b1
replace submodules with proper NPM dependencies & webpack
2020-04-02 02:51:41 -05:00
Jesse D. McDonald
ce7a69a10a
filter unwanted fields from received JSON board string
2020-03-30 00:06:19 -05:00
Jesse D. McDonald
d37cb4a67f
simplify filter expression for GUN message logging
2020-03-30 00:05:48 -05:00
Jesse D. McDonald
d329f005da
remove redundant closeNotifications() before setCurrentGame()
2020-03-29 20:16:03 -05:00
Jesse D. McDonald
d5b3594e57
close prior notifications when updating game state
2020-03-29 16:40:48 -05:00
Jesse D. McDonald
eb25bb31d2
make entire square clickable to select, not just the piece
2020-03-29 16:12:46 -05:00
Jesse D. McDonald
c9bd8a06af
add 'Paco Ŝako' theme based on the icons from the manual
2020-03-29 15:40:23 -05:00
Jesse D. McDonald
dca6754b65
omit move number when last move is a resignation
2020-03-29 01:37:37 -05:00
Jesse D. McDonald
7e0cdfbdc2
don't reload page when switching games
2020-03-29 01:15:40 -05:00
Jesse D. McDonald
1eb253c92d
fix for metadata omitted when replaying resignation moves
2020-03-29 01:15:13 -05:00
Jesse D. McDonald
8e639a68eb
stop using Gun.chain.map; monitor game list changes manually
2020-03-29 01:14:26 -05:00
Jesse D. McDonald
f184df6447
avoid updating select options when text didn't change
2020-03-29 01:03:34 -05:00
Jesse D. McDonald
b5c830ab68
create a helper for cancellable Gun.chain.on callbacks
2020-03-29 00:29:47 -05:00
Jesse D. McDonald
c7c1905f9d
process null metadata to handle deletion properly
2020-03-29 00:28:50 -05:00
Jesse D. McDonald
f3ae25f16a
set metadata to null when there are no names or moves
2020-03-29 00:27:38 -05:00
Jesse D. McDonald
2e324b180c
add some logging options for GUN messages
2020-03-28 22:29:38 -05:00
Jesse D. McDonald
72650faded
fix moves not animating when received from peers
2020-03-28 19:36:45 -05:00
Jesse D. McDonald
8e66eb3537
re-disable GUN local storage
2020-03-28 19:36:28 -05:00
Jesse D. McDonald
51ee683bad
simplify handling of piece images with CSS content attributes
2020-03-28 18:24:20 -05:00
Jesse D. McDonald
57b5da99b5
minor refactoring & internal name changes
2020-03-25 17:56:54 -05:00
Jesse D. McDonald
3df80ed59a
add basic animations
2020-03-23 01:53:53 -05:00
Jesse D. McDonald
0c983c1d70
disable debug output & add some items to the Admin object
2020-03-23 00:09:41 -05:00
Jesse D. McDonald
ec1a2bd1fd
add option to reverse board layout; style tweaks for controls
2020-03-22 23:49:51 -05:00
Jesse D. McDonald
4339ae2f01
add click-to-move feature
2020-03-22 12:58:29 -05:00
Jesse D. McDonald
a96e8f1e4f
major rewrite; breaking change; game logic in separate file
2020-03-22 01:38:34 -05:00
Jesse D. McDonald
89f335479b
add network time synchronization & fix initial timestamp
2020-03-15 20:18:30 -05:00
Jesse D. McDonald
8a3e3ca4f2
work around sync issues by reloading page when switching game
2020-03-15 20:09:06 -05:00
Jesse D. McDonald
2e6764ffb5
add support for resignation
2020-03-15 15:57:17 -05:00
Jesse D. McDonald
85375530a9
fix .cb-legal and .cb-start classes not placed correctly in some corner cases
2020-03-15 14:31:21 -05:00
Jesse D. McDonald
0769d7579b
add more precise disambiguation of pieces in history
2020-03-15 14:30:33 -05:00
Jesse D. McDonald
5011cfed8c
fix a null reference when checking for legal en passant moves
2020-03-15 14:27:34 -05:00
Jesse D. McDonald
c20dda886a
move both pieces when rook is paired while castling
2020-03-15 13:09:56 -05:00
Jesse D. McDonald
def7ccdbcb
require empty squares (both sides) between king and rook to castle
2020-03-15 13:03:39 -05:00
Jesse D. McDonald
baf4c19f1d
clean up the logic around en passant and pawn promotion
2020-03-15 12:58:14 -05:00