Which rock, paper, scissors winner block do you prefer?

Winner, or Winner 2.0? How advanced would one need to be to understand 2.0?

Edit: I fixed it, hopefully:

Ah, yes. Thanks.

Can you post a result pic?

Why is it the same outcome every time? Shouldn't it be randomized?

Hi! This shows only how the winner is found. Completely deterministic.

In other words, given two strings in "rock", "paper", "scissors", it returns "winner beats loser", with "winner" and "loser" the winner and loser, or if they are the same, it returns "tie".

Cool project, works fine for me.

I think the student would have to know about 2 dimensional lists beforehand


I'd make it a bit more explict rather than having everything bundled into one nested block


Plus it handles the non valid entry issue

I made this nicer looking one

I'm actually a little bit surprised it works as I half-expected that Snap! wouldn't consider the two lists to be equal but it does:)

[edit - now I've found that this works - if nothing else - you could use the concept in your original code to declutter it a bit


Thanks for working on this!

Jens weighs in with an elegant solution.

I'm fine with 1.0 as it is easier to understand. I mean, it's tedious to go through all that code and modify it for another game, even when you are making an extension or mod or remix. But some people like me are fine with tedious but understandable code rather than easy but unreadable code.

For 1.0 blocks:

You need to change this and make the block report a "Tie"
Rock Paper Scissors error

EDIT: I know you changed this error in the 2.0 blocks so that it will report "Tie" but please change it for the 1.0 blocks too

Hi! Thanks for answering. I’m trying to find out why some prefer the simpler but longer version over the functional approach. Maybe someone has seen a study on this.

Here’s Jens’s elegant solution, with my small modification. (Wouldn’t it be nice if Snap! had an “introduce variable” refactoring that would do what I did manually?)

Fixed. Thanks!

What about
rock script pic

with an optional shortcut to generate winning pairs in list order.rock script pic (1)