Skip to main content
added 19 characters in body
Source Link
jolrael
  • 123
  • 3

Depending of what you want, there is some things you can do:

  • refactor dice drawing function as there is a lot of redounding code
  • a check for all inputs (nothing prevent your user to input bet out of 2-12 and money out of 0-1000, eventeven negative bet or non numeric ones
  • add a loop allowing player to play multiples games (with money carried between)
  • i probably would have used a table to store possibilities of bet

Without further informations about what you want to improve, it's hard to be more specific

Depending of what you want, there is some things you can do:

  • refactor dice drawing function as there is a lot of redounding code
  • a check for all inputs (nothing prevent your user to input bet out of 2-12 and money out of 0-1000, event negative bet
  • add a loop allowing player to play multiples games (with money carried between)
  • i probably would have used a table to store possibilities of bet

Without further informations about what you want to improve, it's hard to be more specific

Depending of what you want, there is some things you can do:

  • refactor dice drawing function as there is a lot of redounding code
  • a check for all inputs (nothing prevent your user to input bet out of 2-12 and money out of 0-1000, even negative bet or non numeric ones
  • add a loop allowing player to play multiples games (with money carried between)
  • i probably would have used a table to store possibilities of bet

Without further informations about what you want to improve, it's hard to be more specific

Source Link
jolrael
  • 123
  • 3

Depending of what you want, there is some things you can do:

  • refactor dice drawing function as there is a lot of redounding code
  • a check for all inputs (nothing prevent your user to input bet out of 2-12 and money out of 0-1000, event negative bet
  • add a loop allowing player to play multiples games (with money carried between)
  • i probably would have used a table to store possibilities of bet

Without further informations about what you want to improve, it's hard to be more specific