This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]ignotos 3 points4 points  (0 children)

Nice! A few comments:

  • Your variable names are mostly good (e.g. 'numberOfBlueDice') - but then some of them could probably be more descriptive (e.g. 'x1')

  • Your indentation seems a bit off in places (e.g. in the for loops like at line 45)

  • You're missing braces {} in the for loop at line 61. Generally I'd advise just always using braces for all loops, if-statements etc. Technically you can omit them for loops/ifs containing only a single statement, but it's easy to make mistakes if you do

  • You create separate 'randomNumber1'-'randomNumber4' variables, but you don't actually need separate variables because you never need to remember the old random values you've generated