delayed-board's People
delayed-board's Issues
Adding Ramda, seamless-immutable, unit tests, moving handlers, moving action creators, rewriting logic to ramda functions
Now project structure is type-centric which is simple but not comfortable to work with.
Game start
aktualnie jest tak, ze bufferSize nie jest uwzgledniany, pozycja graczy jest losowa a gre zaczyna zawsze gracz pierwszy.
jak powinno to wyglądać (opis dla 2 graczy):
-
kolejność kto zaczyna jest losowana (utils/number jest funkcja do generowania losowych liczb)
-
wybór pozycji turowo. mozna do tego wykorzystać i rozszerzyć komponent board
2.1 pierwszy gracz wybiera pozycje
2.2 drugi gracz widzi wybrana pozycje pierwszego, wybiera swoją (wybrana pozycja musi być wolna) -
wypelnienie bufora turowo. karty, którymi gracze mogą zapełnić bufor to ich własne, skład talii każdego gracza definiuje plik constants/settings deckComponents. Mozna wykorzystać komponenty cards, buffer, card w nowym kontekście.
3.1 gracz pierwszy ma za zadanie wypełnić swój bufor swoimi kartami (constants/settings buforSize). domyslnie rozmiar bufora to 5 (mozesz zmienic), gracz musi więc wybrać pięć kart i zatwierdzić wybór. kolejność kart jest ważna więc dobrze zeby wybór można było zmienić przed zatwierdzeniem.
3.2 gracz drugi wybiera karty i zatwierdza -
stan aktualny (to już jest), gra turowa. gdy każdy wybierze karte z bufora zdejmowana jest ostatnia i wykonywana. Karta, która jest wyjmowana z bufora po wykonaniu wraca do gracza i może być wykorzystana ponownie.
Player ma dwie listy: cards i buffer.
wykonanie ruchu przez gracza to przeniesienie wybranej karty z kolekcji cards do kolekcji buffer.
egzekucja ruchu to wybranie ostatniej karty z buffera, realizacja ostatniej karty i przeniesienie jej do kolekcji cards.
~
game.state.roundCounter = licznik rund. runda kończy się wtedy kiedy każdy z graczy włoży do buffer 1 kartę.
game.state.roundMoves = licznik ruchow podczas rundy. jezeli roundMoves === activePlayers.length, wtedy runda się skończyła
game can end in a draw
game can end in a draw. the field 'winner' and it's handlers supposed to change
users initial state should respect settings.maxPlayers. random names can be generated via https://www.npmjs.com/package/sillyname package
Swap custom console.log based logger for redux-dev-tools
- Console is being bloated by custom logger
- It's inconvenient compared to browser extension
This will be needed especially after #6 merge - we will have a lot more (small) state changes.
Add redux-saga, move logic from handlers to saga workers
Logic inside handlers has some serious drawbacks:
- It's harder to track changes, when they "all" occure at once -> e.g. onMove handler
- 'It's harder to test these changes, cause lot's of data is involved
- We can't dispatch action from handler in response to particular change, cause we're already in reducer.
editable settings
new scene called like settings to edit the variables from constants/settings file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.