freerunning20 / blackjack_state_machine Goto Github PK
View Code? Open in Web Editor NEWThis project forked from endform/blackjack_state_machine
a simple state machine to play blackjack with
This project forked from endform/blackjack_state_machine
a simple state machine to play blackjack with
This is a little demo of how you can use state_machine to write simple interactive applications. Included in the repo is Blackjack_state_machine.png which is a graph that represents the machine with all states and events. The main loop is pleasingly concise. Each state offers a command method that causes the program to advance the underlying state and return a symbol for the next even that should fire. The different agents, the dealer and the player classes, have methods on them which sometimes compute the next event programatically but some require user input. The tests are under the spec folder. I gleaned the rules for blackjack from this page http://en.wikipedia.org/wiki/Blackjack To install please clone this repo and then run gem build blackjack_state_machine.gemspec gem install blackjack_state_machine-0.0.1.gem To run the tests install rspec and then just run 'rspec', note they rely on some 1.9.2 specific features. The actual program should function just fine To run the game itself if your path is setup correctly you can just enter blackjack_state_machine on the command line. If not, cd into this directory and run ruby -Ilib bin/blackjack_state_machine
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.