Review My Code

Id like a thorough analysis on my code. I implemented a random number generator to select a word from a map, and my IsGameWon() method return EGuessStatus (enum class) instead of bool

(I wanted to come up with a solution before watching lecture 43, but this seemed to me to work fine so i kept it in my code)

I also decided to rethink where to add and how to select the random words so i scrapped the namespace{words…} I originally implemented and once I figured out how to effectively use std::map (TMAP) I implemented it that way instead.

I ended up saving a few lines of code and now I can add words in one place and not have to worry about editing other code or my rand() in order to add the word.

My Final Code

Privacy & Terms