#Pig Game

11 messages · Page 1 of 1 (latest)

dusk jungle
#

Hi! Made this pig game, rules are you keep playing until your total points becomes 100, i setup player and computer method. Problem is for Computer method, it only stops if its rolling a 1 which is correct but it doesn't stop if a total of 20 points are accumalated. And second issue is no winner is ever declared, for both computer and player. The winner is whoever gets 100 total points the fastest. When player reaches well beyond 100, it just gets in a infinite loop and never stops. If anyone could fix that would be very much appreciated :)

https://justpaste.it/8xloa

lucid rainBOT
#

This post has been reserved for your question.

Hey @dusk jungle! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

dusk jungle
#

*if anyone could figure why its happening

#

update, fixed the part where it doesnt stop when greater than 20

#

but have another issue which is when either die rolls a 1, the current score is not resetting to 0 and the current score still gets added to total score

#
Current Score: 8
Total Score: 25
Would you like to roll again (y/n)
n
Player Holding, Total Score: 25

Player rolled 1 and 5
Current Score: 6
Total Score: 31
You rolled a 1! Current points forfeited```
#

if it rolls a 1, the output should have been:

Current Score: 0
Total Score: 25

dusk jungle
#

anyone free?

dusk jungle
#

man fuck all of u

#

i fixed it