samedi 2 mai 2020

Is there any way to generate a random integer using Shoes?

I'm making sort of a guessing game using the ruby GUI framework Shoes. I am very, VERY new to it and would like to know if it's possible to generate a random integer. In regular ruby, for example, if you wanted to generate a number from one to ten, the code would be

int = 1+rand(10)

Can I use this same code or is there Shoes syntax for this?




Aucun commentaire:

Enregistrer un commentaire