RL-Dice: What am I doing wrong??
Posted: Thu Nov 21, 2019 2:04 am
I'm working on a simple rock, paper, scissors game to further familiarize myself with Love. So far, it's been going pretty well, I've been able to solve all my issues myself up until now. I'm at a loss for this one.
I'm using RL-Dice for random number generation (I chose to use RL-Dice for this because I plan to turn this into a bigger project that will benefit from it in the future).
I told Love to print either rock, paper, or scissors depending on the value of the die roll (1 = rock, 2 = paper, 3 = scissors). This seems to work most of the time, but occasionally the raw value is printed instead of printing rock, paper, or scissors. I can't figure out why this is happening. I'm sure it's something super simple that I'm overlooking. For the time being, I added a print function to tell the user that it's a glitch and they should try again, but that's not ideal! I want it to just function correctly 100% of the time!
I'd greatly appreciate it if someone could tell me why this is happening and how I can fix it.
Thank you!
I'm using RL-Dice for random number generation (I chose to use RL-Dice for this because I plan to turn this into a bigger project that will benefit from it in the future).
I told Love to print either rock, paper, or scissors depending on the value of the die roll (1 = rock, 2 = paper, 3 = scissors). This seems to work most of the time, but occasionally the raw value is printed instead of printing rock, paper, or scissors. I can't figure out why this is happening. I'm sure it's something super simple that I'm overlooking. For the time being, I added a print function to tell the user that it's a glitch and they should try again, but that's not ideal! I want it to just function correctly 100% of the time!
I'd greatly appreciate it if someone could tell me why this is happening and how I can fix it.
Thank you!