Skip to content

Instantly share code, notes, and snippets.

@pvinthemix
Last active December 4, 2018 21:43
Show Gist options
  • Save pvinthemix/e1c3acc1dd7a60104ef26abc3988dcf0 to your computer and use it in GitHub Desktop.
Save pvinthemix/e1c3acc1dd7a60104ef26abc3988dcf0 to your computer and use it in GitHub Desktop.
Heather & Paul - Wheel of Fortune - OOP Diagram

Game Class:

Properties:

  • How many players are playing
  • What round it is
  • Active/Current Puzzle
  • Active/Current Wheel
  • BonusRound true or false?

Methods:

  • How to calculate the winner
  • Start the game
  • Reset the game
  • The game knows how to distribute points to the player
  • Change player

Player Class:

Properties:

  • Name
  • Bank Account - for the whole game (decides the bonus round with whoever has the most)
  • Wallet - is per round

Methods:

  • The ability to guess a letter
  • The ability to buy a vowel
  • The ability to solve the puzzle

Puzzle Class:

Properties:

  • Current puzzle
  • Puzzle completed

Methods:

  • Populate the puzzle
  • Populate the bonus puzzle
  • Check answer

Round Class:

Properties:

  • Current puzzle round

Methods:

Wheel Class:

Properties:

  • Spin Values (an array of 6 of those values randomly selected to show on the dom)
  • The current value of the spin

Methods:

  • Inheritance/Extends: Bonus round will extend Round and have a different monetary value or special prize as a property.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment