From a5537d23d2e13defdadab053ab94cc9e03b11c88 Mon Sep 17 00:00:00 2001 From: lolabird Date: Sat, 30 Sep 2023 10:23:21 -0600 Subject: [PATCH] Create skeleton of game --- script.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/script.js b/script.js index e69de29..9fd23d2 100644 --- a/script.js +++ b/script.js @@ -0,0 +1,38 @@ +function getComputerChoice(){ + // get random number between 1 and 3 + // if 1, return "rock" + // if 2, return "paper" + // if 3, return "scissors" +} + +function playRound(playerSelection, computerSelection){ + //p = playerSelection.toLowerCase() + //c = computerSelection.toLowerCase() + + // if player && comp === "rock", || if p && c === "paper" || p && c === "scissors" return "tie" + + //else if p === "rock" + //if c === "paper" player loses + //else if c === "scissors" player wins + //else if p === "paper" + //if c === "scissors" player loses + //if c === "rock" player wins + //else (p === scissors) + //if c === "rock" player loses + //if c === "paper" player wins +} + +function game(playerSelection, computerSelection) { + // for (var i = 0; i < 5; i++) + //playRound(playerSelection, computerSelection) + + //count how many times p and c have won + + //return whether or not p has won + +} + +// const ps = prompt("Rock, Paper or Scissors?") +// const cs = getComputerChoice() + +//console.log(game(ps, cs)) - \ No newline at end of file