Making with Code

Uno Lab #

In this lab, you are construct elements of the classic card game, Uno.

[0] Let’s Play Uno #

๐Ÿƒ Let’s start by playing the classic card game, Uno. As you’re playing, consider the different components and mechanics of the game.

โœ… CHECKPOINT:

As you play, construct your model for the elements of Uno.


[0] Setup #

๐Ÿ’ป Start by going into your cs9/unit02_games folder.

cd ~/desktop/making_with_code/unit02_games

๐Ÿ’ป Clone your starter code. Be sure to change yourgithubusername to your actual Github username.

git clone https://github.com/the-isf-academy/lab_uno_yourgithubusername
๐Ÿ’ป Enter the Poetry shell and install the requirements:
poetry shell
poetry install

This is the largest software package you have encountered and includes the following files:

  • card.py
  • deck.py
  • player.py
  • uno.py
  • uno_cards.csv

[2] Implement your Models #

๐Ÿ’ป Impelment for model of the Card. Test it to ensure it works as you expect.

๐Ÿ’ป Impelment for model of the Deck Test it to ensure it works as you expect.

๐Ÿ’ป Impelment for model of the Player Test it to ensure it works as you expect.

๐Ÿ’ป Impelment for model of the Uno Test it to ensure it works as you expect.


Solutions #

๐Ÿ’ป For Uno() you must finish the following methods. Be sure to test all of the methods at the bottom of the file.

  • deal_starting_cards()
  • check_if_card_valid()
  • special_card_action()

[3] Deliverables #

โšกโœจ

Once you’ve successfully completed the game be sure to fill out this Google form.

๐Ÿ’ป Push your work to Github:

  • git status
  • git add -A
  • git status
  • git commit -m “describe your drawing and your process here”

    be sure to customize this message, do not copy and paste this line

  • git push


[4] Extension #

๐Ÿ’ป Impelment the game loop for Uno You will need to create two files:

  • view.py
  • game.py