An example of a Casino supervision tree in Elixir
Elixir
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config First commit Aug 22, 2016
lib Change how players are killed Aug 22, 2016
test First commit Aug 22, 2016
.gitignore First commit Aug 22, 2016
LICENSE Update README Aug 22, 2016
README.md Update README Aug 22, 2016
mix.exs First commit Aug 22, 2016

README.md

Casino

An example of a Casino supervision tree in Elixir

Installation

Clone the repository:

git@github.com:philipbrown/casino.git && cd casino

Fire up iex:

iex -S mix

Usage

# Add a new player
Casino.add_player("Philip", 100)

# Add another player
Casino.add_player("Jane", 250)

# List all of the players
Casino.list_players

# Remove a player
Casino.remove_player(2)

# Count the active blackjack tables
Casino.count_blackjack_tables

# Add 3 more blackjack tables
Casino.add_blackjack_table(3)

# Count the blackjack tables again
Casino.count_blackjack_tables

# Remove a blackjack table
Casino.remove_blackjack_table

# Count the blackjack tables one last time
Casino.count_blackjack_tables