furkanemre
v0.0.13
Published
Seed project for React apps using ES6 & webpack.
Readme
Yuzbir Okey in React
DEV DIARIES
Write a diary for each challenge you take
PLAN
8.13 : 3 Login
8.16 : 3 GamePlay
8.19 : 3 UserProfile
8.22 : 3 Tournaments
8.25 : 3 Leaderboard
Login
- [x] add loading states
- [x] add localstorage
Juice
- [ ] Add Color
- [ ] tween/scale stones etc
- [ ] table stones much smaller / stackable
- [ ] sounds/ radio
- [ ] add particles / smoke
- [ ] confetti game end
- [ ] stone stacks shown
GamePlay
- [ ] Fix layout
- [x] Improve stones
- [+] Improve user cards
- [x] Stone groups draggable
- [x] stones not overlap
- [x] stone groups count shown
- [0] total count shown
- [x] middle stone count
- [ ] timer auto play
- [ ] enable click play
- [x] add fake okey
- [ ] Fix layout
UserProfile
- [x] add language switch
- [ ] Game stakes are applied
- [ ] User Profile dialog
- [ ] Clickable user links
- [ ]
BUGS
- [ ] put the new added stone first empty place
- [x] groups z index messed at bottom
- [x] transition is on when withdrawn middle
- [x] scoreboard shows nan values
- [x] discard stones shows very first instead of last
- [ ] transition glitch happens when drag last stone in stone group
- [x] fix z index for open stones
- [x] stone transition bug on open sequence
- [x] throws on leave table
- [x] custom drag layer throws when dragged non draggables
- [x] draw left / open sequence / leave taken fail
- [x] hover css style mess when dragging stones
- [ ] pair opening stone is removed by duplicate when left is same
- [ ] sometimes rooms don't get removed, probably caused by breakpoints
- [x] drop on discard mini box area calculate wrong (row column)
- [x] open sequence twice causes bug
- [x] replace okey should replace higher order stone
- [x] open sequence / open pairs / collect open rule and save bug
- [x] open sequence / open pairs / can't open sequence again
- [+] open sequence and pairs implement server side
- [ ] two okeys doesn't make a group
- [x] update max pair on player open seq/pair
TODO
Other
- [ ] add version to the main menu
- [ ] add online user counts
- [ ] make player names as link
- [ ] show toast for open seq cases
- [x] add room name to room options
- [ ] improve lobby
- [x] make table sit randomly
- [x] reset on round end
- [+] improve user lighten colors and highlight current player
- [ ] add useful error messages to chat
- [ ] add this http://api.adorable.io/avatars/285/[email protected]
Refactor
- [x] remove player logic from okeytablecenter
Functionality
- [x] dnd pieces
- [ ] dnd for stone group
- [ ] add game end state and countdown
- [x] add rules for can drag/drop can open sequence/pairs
- [ ] add game state, options
- [ ] add disconnected case handle errors
- [ ] add dev tool component to iterate individual component
CSS
- [x] add stone
- [x] seperate okey-stone okey-stone-draggable components
ISSUES
- [x] Add lobby games table
- [ ] Add tests for PLAYER_ actions
- [ ] Fix case When opened sequence and opened pairs on the same turn
- [ ] Fix leave taken player
Discussion
What To Have In Game Toolbar
- [Room Name] [Round 1/3] [Stake] [IsFast]
- Current open state
How to open stones and process meanwhile
- User opens stones
- User process stones to self
- User process stones to others
- Collect open
- Discard with open stones
State is stones and sequence.
- Save
stonesandsequenceand set them new values - Each stone on
sequencehas dirty flag set to true if has self opened groups on the same turn and processed to a group with a group owner. - Each group on
sequencehas a group owner, except self opened groups on the same turn - Restore
stonesandsequenceon collect open - Add each dirty stone to
prematureProcessStones, send the stones with no group owner as open groups
How to keep track of rules
State: canWithdraw, canDiscard, canOpenPairs, canOpenSequence, canProcessStone, canCollectOpen, canLeaveTaken
Actions: withdrawLeft, withdrawMiddle, discardStone, processStone, openSequence, openPairs collectOpen, leaveTaken
withdrawLeft -> canWithdraw -> isMyTurn, hasWithdrawnThisTurn
withdrawMiddle -> canWithdraw -> isMyTurn, hasWithdrawnThisTurn
openSequence -> canOpenSequence -> isMyTurn, canWithdraw hasOpenedPairsThisTurn, hasOpenedPairsThisRound
openPairs -> canOpenPairs -> isMyTurn, canWithdraw hasAnyoneOpenedPairsThisRound``
collectOpen->canCollectOpen->isMyTurn, hasOpenedPairsThisTurn, hasOpenedSequenceThisTurn
leaveTaken->canLeaveTaken->isMyTurn, hasWithdrawnLeftThisTurn
discardStone->canDiscard->isMyTurn, hasWithdrawnThisTurn, hasWithdrawnLeftThisTurn, hasOpenedSequenceThisTurn,
hasOpenedPairsThisTurn,
discardOpenSequence->canCommitOpenSequence -> canCommitOpenSequence(sequence)
discardOpenPairs -> canCommitOpenPairs -> canCommitOpenPairs(pairs)
processStone (stone) (group) -> hasOpenedPairsThisTurn, hasOpenedSequenceThisTurn, canProcessStone(stone, group)
- GameRulesStore
- Properties
currentTurnhasWithdrawnThisTurnhasWithdrawnLeftThisTurnhasOpenedPairsThisTurnhasOpenedSequenceThisTurnhasOpenedPairsThisRoundhasOpenedSequenceThisRound
- Computed Properties
isMyTurncanWithdrawcanDiscardcanOpenPairscanOpenSequencecanCollectOpencanLeaveTaken
- Properties
Undecided Concerns
- Can a player open sequence and open pairs on the same turn?
