Rolling dice game in JavaScript