Mixed Messages Project - Game: Die-rolling Race To 50

Hello all!

I had trouble coming up with a simple project and ended up settling on this game :slight_smile:

As of this post, this project is only in JavaScript and I have inputted the number of players instead of asking a user how many players there are. Also, each player doesn’t get to input their name, but are called “Player <some_number>”.

This project was pretty easy. I did not do well in remembering the syntax, but it was easy to look up documentation on it. I also had an idea of how to get the minimum number of rolls out of all the players, but thought there was an easier way. It was easy here as well to find StackOverflow + JavaScript documentation to understand what that easier way is.

I spent a little time every day for about a week, totaling about 4 hours.

Here is the link to my repo if you’re interested in taking a look :smiley:

Thanks for being so great! Hope you’re having fun with the course as well!


Great work! You have used objects to store related data and methods and take into account that may be more than one winner.

Some thoughts:

  1. In real game players will roll dices one by one, not until 50 dots at once. You can use nested loops to realize this.
  2. You have two methods in player object roll_die and increment_rolls. So you can invoke roll_die without increment_rolls and it is incorrect. If two actions tightly coupled I recommend to combine them into one function.
  3. I recommend to show result of each roll, not only dots total.
  4. You can use ASCII-art to show the dice. See ASCII Art Dice - asciiart.eu Only single side is neccessary.

Thanks for sharing!

PS Sorry for my English)

No need to be sorry! Thank you for the feedback. Your thoughts make sense and I understand why each point was mentioned.

Thank you for your help and taking the time to review it!