lundi 12 février 2018

Can you randomize letters in Pascal?

I am creating a rock paper scissors game in Pascal for my computer science class at university.

I have the code where I type 0, 1, or 2 to represent rock, paper, or scissors and that is fully random.

I was wondering if there was a way to make the letters r,p,s random to stand for rock, paper, or scissors instead of using the numbers.

I have tried to randomize this game with r,p and s. Does the random "command" only work for numbers, and if so, is their a command to randomize letters?).

Thank you for taking the time to read this! If you have any questions please feel free to ask me, thanks!

ps. I don't know if you know what I am talking about but I tried to post the code for over half an hour at 5 am and it still isn't formatted correctly and wont let me post it, sorry I'm new to this.




Aucun commentaire:

Enregistrer un commentaire