https://cscprogrammingtutorials.com/exercise-3-14-game-heads-or-tails/