russian-roulette | ... Go ahead and try your best with this CLI russian | Game Engine library
kandi X-RAY | russian-roulette Summary
kandi X-RAY | russian-roulette Summary
:four_leaf_clover: You want to push your luck? ... Go ahead and try your best with this CLI russian roulette! :boom:
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of russian-roulette
russian-roulette Key Features
russian-roulette Examples and Code Snippets
Community Discussions
Trending Discussions on russian-roulette
QUESTION
im making a web based game but the problem is that the the same happens every round the same balls die in the same order and same ending every time nothing changes i dont know what i the problem (basically no randomizing)
the idea of the game(russian-roulette) :
there is a 1 in 6 chance of dying when you hit the button and it goes every player starting from the left one to the end which is the bottom left ball and the if you hit the button your and the loaded value is the same as the shot value you die. you win by surviving
and please if you have a solution explain it because im a beginner at this and thank you
ANSWER
Answered 2021-Sep-07 at 19:46Problem is the assignment in your first if statement, you kept reasigning players
to balls.length
so it will always have the same outcome
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install russian-roulette
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page