Rock Paper Game

Hi everyone.

I’m trying to create a Rock Paper Scissor game against the computer.

I have no problem to create it with number (0,2).

Considering the numeric value of each choice I end up with 4 flowchart decision branches.
If player = CPU
If player - CPU = either -2 ; -1 ; 1 or 2. (-2 and 1 been the winning conditions; -1 and 2 the losing conditions).

But I would like to replace the decision step with words instead of number.

I can manage that part using a String variable.

However after I don’t know how to reconvert the picked choice into number to be able to use the flowchart decision process listed before.

Thanks by advance.

Hy @David_S,

You can load a dictionary with the number and the and the word. So you can convert your data.

Check the Miscrosoft.Activities.Extension Package.

Any questions please let me know

1 Like

That indeed should work.
Will try this once back home (and update as mark as a solution if it runs)

ok @David_S,

If it works correctly please like my posts and mark my answer as solution, it helps me :slight_smile:
Any more questions please let me know

regards

1 Like

Damn, no matter what I try I can’t manage to make it work when I switch numbers with words.

Here is the sequence used (only using numbers).

Main.xaml (19.9 KB)

I want to change the select option used in the sequence shared by the one on the picture.
image

Hi @David_S Here’s your revised workflow. I guess this is what you want to have Main_revised.xaml (23.1 KB)

1 Like

Oh a switch activity. I have to learn how to use them but thank you so much, that’s exactly what I wanted to do.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.