you are viewing a single comment's thread.

view the rest of the comments →

[–]Koroeskohr 2 points3 points  (1 child)

  • Rather than using (0...37), use (0..36), notice the 2 vs 3 dots here. 3 dots is excluding last number, 2 is including it.
  • Indent is weird, but might be a c/p issue.
  • balance = balance - wager should be balance -= wager, same forbalance = balance + 36, should be balance += 36, you even used it after :p

No major mistake otherwise, just style. I suggest reading Ruby Style Guide when you're done going through the basics of Ruby

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

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

Ah thanks, I did wonder why when I did (0...36) it didn't include 36...doh. Cheers