7 kyu

Rock Paper Scissors Oracle

206 of 370finnhodgkin

Description:

You are the rock paper scissors oracle.

Famed throughout the land, you have the incredible ability to predict which hand gestures your opponent will choose out of rock, paper and scissors.

Unfortunately you're no longer a youngster, and have trouble moving your hands between rounds. For this reason, you can only pick a single gesture for each opponent. If it's possible for you to win, you will, but you're also happy to tie.

Given an array of gestures — for example ["paper", "scissors", "scissors"] — return the winning gesture/s in the order in which they appear in the title, separated by a forward slash. For example, if rock and scissors could both be used to win you would return:

"rock/scissors"

If it's not possible for you to win then return:

"tie"

See https://en.wikipedia.org/wiki/Rock%E2%80%93paper%E2%80%93scissors if you're not familiar with rock paper scissors.

Second attempt at my first Kata...

Fundamentals

More By Author:

Check out these other kata created by finnhodgkin

Stats:

CreatedOct 17, 2016
PublishedOct 17, 2016
Warriors Trained1775
Total Skips28
Total Code Submissions2466
Total Times Completed370
JavaScript Completions206
Python Completions182
Total Stars21
% of votes with a positive feedback rating86% of 106
Total "Very Satisfied" Votes82
Total "Somewhat Satisfied" Votes18
Total "Not Satisfied" Votes6
Total Rank Assessments7
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • finnhodgkin Avatar
  • cliffstamp Avatar
  • Rud1 Avatar
Ad