Check out: murrayju.com
murrayju / durak Goto Github PK
View Code? Open in Web Editor NEWa card game
a card game
Check out: murrayju.com
we should use this:
https://github.com/atlassian/react-beautiful-dnd
Games are currently only stored in sever memory. They should be persisted to the db, and survive a server restart (deployment).
Game will feel more interactive, and it'll be more clear what's happening in some cases.
It's not playable.
Currently secondary attackers are allowed to throw the initial attack.
Probably best done with drag and drop.
Just having all of the attackers do it should be enough to proceed.
maybe people should have to vote to agree
Currently if the defending player doesn't ask before clicking the button, there's no chance for attackers to fill the empty attack slots when they are picking up.
Should be possible to drag and drop cards to play them.
Maybe make it orange or something less inviting? Move it somewhere else?
Warning: Encountered two children with the same key, 'X:X'
- so this is flooding the console as I'm sure you are aware - the ids
for the cards are not unique which makes this interesting
I'm just wondering what you thought process was here - I feel like if you build a deck, all the cards should be assigned a unique key and another attribute should control their state (flipped or not) - It seems like we are controlling both of these things with the id field. I think it is important to not show the card identity in the page's inspectable elements, so your approach makes sense, but there should be some kind of uuid, right?
Several things would be clarified if what is currently named 'game' were renamed to 'table'. A table is what gets a unique URL, and is what the players join. A given table can have multiple games (in series, not in parallel).
make the hands look pretty for smaller resolutions
don't make everyone click it's beat when there's nothing to do.
In general, if someone attempts something invalid, it shouldn't reset the state of votes by other users.
The cards are fanned out backwards, such that only the value of the top card can be read. They need to be fanned out in the opposite direction.
The player position should be stable.
Players should be able to see if there are spectators
This is how players will play cards.
It's too easy to accidentally click the pick up cards button where it is. It'll make more sense under the attacks in the play area.
Nothing ever removes games from the db, so they will accumulate. Some sort of cron job should delete old games that nobody is connected to.
Would be nice to know if a player got disconnected.
Once the trump card is drawn, there's no visible indicator of what the trump is.
Probably use Jest.
Currently the attack limit is 6, so it lets people attack when the defender is out of cards.
If in a state where no more plays can be made:
It should not be necessary for all players to click the "it's beat" button. Could wait for a single vote, or use a countdown timer (or both).
People find it confusing when a player goes out, and the remaining players move around on the screen.
May be best to keep all of the players there in the same spot, and just indicate them as being out.
If someone joins late, it should be possible to just deal them in mid-game.
Current starting player is random, should be the player with the lowest trump.
This should somehow be revealed to the other players as well.
If the primary attacker plays all of their cards to go out, the play then effectively advances two turns, skipping a player.
Should be able to see when other players say it's beat
Currently, clients who join after the game has started are added as spectators, and will be players in the next round.
We should return to the lobby between games, and allow users to choose spectator/player.
This is mostly to enable animating the movement of obscured cards. Each card should have a unique (per deck) id that is unrelated to the card's value, and is available whether obscured or not.
Players should be able to leave the game, and other players should be able to kick inactive players from the lobby.
This could be done somewhat automatically, with a timer around when the eventstream was last connected.
It should be up in the play area, just like the pick up cards button.
Might be helpful to show a running log of the actions that were taken. Maybe not a complete list of everything, but the last N actions.
The discard pile is too neat, and looks like a draw deck. Cards should be piled up a bit more randomly.
Doesn't happen in the chrome dev tools simulator thingy, but does happen on a real phone. Seems to be caused by how the address bar is there and is supposed to disappear on scroll.
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.