Quantcast
Channel: Pimoroni Buccaneers - Latest posts
Viewing all articles
Browse latest Browse all 54434

Rpssl

$
0
0

Hi,

Thank you for your reply, it means a lot to me.

I want to make a little clarification about my initial message, when I said that I am involved in a lot of projects I wanted to say "start thinking in different things instead of finishing at least one" hahaha I can be still considered a newbie.

I updated the repo with your code fix. Also amended the commit, cause I realized that I put such unclear commit messages. I won't amend the older ones, but as this one was created a few days ago I think it's better this way. I am also so new to GitHub, excuse me for this.

Hope not to sound pretentious, but if you like the game you can add to the examples without any problem!

I sent this message without the explanation of the scoring, time to edit:

Tie: it's clear. If both numbers are the same, we get that.

Player wins: we need to get either 2 or 1 as the result of (player-RaspberryPi) % 5. In order to achieve this, player-RasperryPi can be: 2,1, -3, -4.

_Computer wins: remaining options. If player-RaspberryPi is: 3,4, -1, -2, Raspberry Pi wins. _

Now just put all the options in a circle like this: rock-Spock-paper-lizard-scissors-(close the circle with the rock). Each options wins against the choices that are placed in the two positions before itself in the circle, and loses against the other two. Example: Spocks wins both against rock or scissors.

Now put a number to each of the choices, as in the code: 0-1-2-3-4 (close circle with a 0). Using Spock's example, we get 1 o -3 as the result of player-RaspberryPi, calculating the module makes us win! However, we get -1 or -2 against the other two choices, being defeated.

Hope the explanation is clear.

Regards.


Viewing all articles
Browse latest Browse all 54434

Latest Images

Trending Articles



Latest Images