Share your repls and programming experiences

← Back to all posts
Lua Rock Paper Scissors
AdobeZev

A simple game of rps made in lua! I had a great time making this in class.

Voters
nerps
SushantSanthosh
gamingvideosD
AdobeZev
Comments
hotnewtop
MatCatt

Pretty cool! What do you use to make it choose rps? I've found it tries to do what's a counter for your last move, or am I just getting luck with math.random?

gamingvideosD

how do u do the console input

AdobeZev

@gamingvideosD io.read("*l");

  • Io is the console; Read reads the console; the *l tells the script to read that line.
katyadee

I just played this with my mom and won!

What class did you make this for?

AdobeZev

@KatyaDelaney I made this in class. I was just bored. It's not a grade.

themaka

@AdobeZev Good start! Looking for a bigger challenge? How about having it keep playing and track wins and losses?

AdobeZev

@themaka Right on it!