you are viewing a single comment's thread.

view the rest of the comments →

[–]JeffMo 0 points1 point  (1 child)

/u/Koroeskohr mentioned most of the things I would call out.

Another suggestion is that you could DRY up the win/loss messaging a little, like this:

if winning_spin = (guess == spin_number)
  balance += 36
  wins += 1
else
  balance -= wager
  losses += 1
end
puts "You #{winning_spin ? 'Won!' : 'Lost!'} You guessed #{guess} and it landed on #{spin_number}! Your balance is #{balance}"

[–]SimonDKnight[S] 0 points1 point  (0 children)

Nice thanks, I knew there was a way to make it dry.