feds01 / durak-cards Goto Github PK
View Code? Open in Web Editor NEWAPI and WebSocket backend sources for the durak card game.
API and WebSocket backend sources for the durak card game.
When a player exits a game, they should be able to view the cards of the other active players by simply clicking on their profile picture.
Crash report:
2021-01-16T17:58:39.105719+00:00 app[web.1]: /app/src/socket/handlers/playerMove.js:177
2021-01-16T17:58:39.105729+00:00 app[web.1]: console.log("Stale connection on ".concat(lobby.pin, ": socketId=").concat(socketId, ", player=").concat(p.name));
2021-01-16T17:58:39.105729+00:00 app[web.1]: ^
2021-01-16T17:58:39.105730+00:00 app[web.1]:
2021-01-16T17:58:39.105731+00:00 app[web.1]: ReferenceError: p is not defined
2021-01-16T17:58:39.105731+00:00 app[web.1]: at forEach (/app/src/socket/handlers/playerMove.js:114:91)
2021-01-16T17:58:39.105732+00:00 app[web.1]: at Map.forEach (<anonymous>)
2021-01-16T17:58:39.105732+00:00 app[web.1]: at _callee$ (/app/src/socket/handlers/playerMove.js:103:18)
2021-01-16T17:58:39.105733+00:00 app[web.1]: at tryCatch (/app/node_modules/regenerator-runtime/runtime.js:63:40)
2021-01-16T17:58:39.105733+00:00 app[web.1]: at Generator.invoke [as _invoke] (/app/node_modules/regenerator-runtime/runtime.js:293:22)
2021-01-16T17:58:39.105734+00:00 app[web.1]: at Generator.next (/app/node_modules/regenerator-runtime/runtime.js:118:21)
2021-01-16T17:58:39.105734+00:00 app[web.1]: at asyncGeneratorStep (/app/src/socket/handlers/playerMove.js:22:103)
2021-01-16T17:58:39.105735+00:00 app[web.1]: at _next (/app/src/socket/handlers/playerMove.js:24:194)
2021-01-16T17:58:39.105735+00:00 app[web.1]: at processTicksAndRejections (node:internal/process/task_queues:94:5)
It should gracefully handle the case if the lobby is full or currently in play.
Players who didn't join in the lobby should be able to spectate the game despite not participating in the actual game.
The card used to transfer the 'defence' status is duplicated and not removed from the original player.
Stack trace:
TypeError: Cannot read property 'deck' of undefined
at Wt (https://durachok.herokuapp.com/static/js/main.1c08808f.chunk.js:1:32482)
at https://durachok.herokuapp.com/static/js/main.1c08808f.chunk.js:1:59346
at Array.some (<anonymous>)
at https://durachok.herokuapp.com/static/js/main.1c08808f.chunk.js:1:59321
at Array.map (<anonymous>)
at https://durachok.herokuapp.com/static/js/main.1c08808f.chunk.js:1:59264
at https://durachok.herokuapp.com/static/js/main.1c08808f.chunk.js:1:59499
at Ds (https://durachok.herokuapp.com/static/js/2.d093eaf0.chunk.js:2:592187)
at t.unstable_runWithPriority (https://durachok.herokuapp.com/static/js/2.d093eaf0.chunk.js:2:610000)
at Ho (https://durachok.herokuapp.com/static/js/2.d093eaf0.chunk.js:2:532358)```
Players should have the ability to resign from a game.
When a player resigns, their cards should be placed at the bottom of the pile. ( We could possibly make this configurable behaviour)
Players can be removed by the admin in the same way as the 'kick' option removes a player from the lobby.
If the owner of a lobby sends a 'DELETE /lobby/:pin' request whilst there are still active connections in the lobby, they should be terminated and sent back to the home page.
User should only be able to attempt to skip the round if there is at least one card on the tabletop.
If the defending user skips, the game must wait until everyone confirms that they have put down everything they want to on the tabletop.
When attempting to join a lobby from the same IP address (any device on your LAN with the same IP address, not necessarily the same device), the game gets stuck on the joining lobby screen rather than displaying a useful error.
If feature enabled, the game should recommend players what cards they can play by highlighting them green in the player deck.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.