Skip to content

scissorspaperstone#336

Open
leongie wants to merge 5 commits intomainfrom
part1-inclMoreComfortable
Open

scissorspaperstone#336
leongie wants to merge 5 commits intomainfrom
part1-inclMoreComfortable

Conversation

@leongie
Copy link

@leongie leongie commented Oct 19, 2021

//scissors paper stone

var main = function (input) {
var userInput = input;
var SPS1 = generateNumber();
var SPS2 = generateNumber();
var SPS3 = generateNumber();
console.log("SPS");
var myOutputValue = "Please input either Scissors Paper or stone";
if (userInput == "Scissors" && input == SPS1)
myOutputValue =
"fair game" + "you input" + input + "computer guess" + userInput;
// (SPS == 2 && userInput == "Paper") ||
// (SPS == 3 && userInput == "Stone")
// ) {
console.log("here");

return myOutputValue;
};
var generateNumber = function () {
var randomDecimal = Math.random() * 3;
var randomInteger = Math.floor(randomDecimal);
var randomNumber = randomInteger + 1;
return randomNumber;
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants