Comments (1)
DeckStore's methods are only called internally from GameStore Methods, which can be triggered by ControlPanel Methods. How does this all fit together?
The purpose of having DeckStore is to isolate Deck actions from Game Actions, but in reality this is not possible since the game state is dependent on the deck state. They can be separated nominally but they must still be coupled closely.
ControlStore is more loosesly coupled with GameStore since it can interface more directly with
So, if each Store is an Event Emitter, then GameStore would need to be subscribed to DeckStore and ControlStore just as Table is subscribed to GameStore. This seems wrong somehow.
Instead, each GameStore should also have its own contants and actions, and Table should get its state from all of them together in onChange
. That way, whenever anything changes in any of the Stores, it will be passed to Table, which in turn will stay up to date.
from blackjack.
Related Issues (20)
- Implement NewPlayer to test Flux HOT 3
- Implement Flux for all Game state methods
- wire up _hideOptionsPanel HOT 1
- wire up _reset HOT 1
- Subscribe Table to listen for changes from GameStore
- Refactor GameStore as an extension of FluxReduceStore
- Add missing dependent methods to GameStore
- Create DeckStore
- Migrate deck methods from Table to DeckStore
- Move player hands to DeckStore
- Migrate Game methods from Table to GameStore
- Hand class HOT 1
- on Deal, players' hands are not evaluating correctly HOT 1
- Hit causes the app to crash HOT 1
- Implement currentplayer as a property of Players class HOT 1
- Implement StateMachine class to handle game evaluation HOT 2
- Resolve named / default exports confusion
- Card numbers are on the same side of the suit icon on the top & bottom
- Upgrade components to TypeScript HOT 1
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.
from blackjack.