Games: Score Tracker
Mix.install([
{:jason, "~> 1.4"},
{:kino, "~> 0.9", override: true},
{:youtube, github: "brooklinjazz/youtube"},
{:hidden_cell, github: "brooklinjazz/hidden_cell"}
])
Navigation
Home Report An Issue Pokemon ServerAsynchronous MessagesGames: Score Tracker
Previously you created a Score Tracker GenServer which can track and add to a score.
You’re going to re-create this score tracker in a Games.ScoreTracker
module.
You may use this Games.ScoreTracker
module in future exercises to keep track of a score.
{:ok, pid} = Games.ScoreTracker.start_link([])
Games.ScoreTracker.add(pid, 10)
10 = Games.ScoreTracker.get(pid)
Games.ScoreTracker.add(pid, 20)
30 = Games.ScoreTracker.get(pid)
Implement the Games.ScoreTracker
in your existing Games project. Create a full test suite to ensure it behaves as expected.
Commit Your Progress
DockYard Academy now recommends you use the latest Release rather than forking or cloning our repository.
Run git status
to ensure there are no undesirable changes.
Then run the following in your command line from the curriculum
folder to commit your progress.
$ git add .
$ git commit -m "finish Games: Score Tracker exercise"
$ git push
We’re proud to offer our open-source curriculum free of charge for anyone to learn from at their own pace.
We also offer a paid course where you can learn from an instructor alongside a cohort of your peers. We will accept applications for the June-August 2023 cohort soon.