Created
August 11, 2016 08:00
-
-
Save VienosNotes/6cbb59e87a5e8f388efd70aff42992af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule TypeZeroSim do | |
def create_deck(spirit, flame) do | |
deck = List.duplicate(:spirit, spirit) ++ List.duplicate(:flame, flame) | |
Enum.shuffle(deck) | |
end | |
def simulate(deck) do | |
hand = Enum.slice(deck, 0, 7) | |
library = Enum.slice(deck, 7, Enum.count(deck) - 7) | |
IO.inspect(hand) | |
end | |
def run() do | |
create_deck(20, 40) |> simulate | |
end | |
end | |
TypeZeroSim.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment