diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66cf315cff4d36b27da828ba.md b/curriculum/challenges/english/blocks/workshop-rps-game/66cf315cff4d36b27da828ba.md index f48209d2c4f..16c81df86d0 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66cf315cff4d36b27da828ba.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66cf315cff4d36b27da828ba.md @@ -9,7 +9,7 @@ dashedName: step-4 In this step, you will focus on determining if the player has won the round. -Create a `hasPlayerWonTheRound` function with two parameters called `player` and `computer`. +Create a `hasPlayerWonTheRound` function with two parameters called `playerChoice` and `computerChoice`. These parameters will take string values of either `"Rock"`, `"Paper"`, or `"Scissors"`, representing the selections made by the player and the computer. The function should return `true` if the player has won the round, and `false` if the player has lost or tied the round. @@ -27,10 +27,10 @@ You should have a function called `hasPlayerWonTheRound`. assert.isFunction(hasPlayerWonTheRound); ``` -Your function should have two parameters called `player` and `computer`. +Your function should have two parameters called `playerChoice` and `computerChoice`. ```js -assert.match(code, /hasPlayerWonTheRound\s*(?:=\s*)?\(\s*player\s*,\s*computer\s*\)\s*/); +assert.match(code, /hasPlayerWonTheRound\s*(?:=\s*)?\(\s*playerChoice\s*,\s*computerChoice\s*\)\s*/); ``` Your `hasPlayerWonTheRound` function should return a boolean. diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66cf33305293e1b35c1aef7f.md b/curriculum/challenges/english/blocks/workshop-rps-game/66cf33305293e1b35c1aef7f.md index be2b25fa822..15b68763016 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66cf33305293e1b35c1aef7f.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66cf33305293e1b35c1aef7f.md @@ -205,11 +205,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); } diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66cf34fcb005e7b447141afd.md b/curriculum/challenges/english/blocks/workshop-rps-game/66cf34fcb005e7b447141afd.md index 18ae7b780fc..dfc6e50c96b 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66cf34fcb005e7b447141afd.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66cf34fcb005e7b447141afd.md @@ -240,11 +240,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); } diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66cf35a75f891ab4f4e5497b.md b/curriculum/challenges/english/blocks/workshop-rps-game/66cf35a75f891ab4f4e5497b.md index 1ece42b35b1..6f796016d6f 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66cf35a75f891ab4f4e5497b.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66cf35a75f891ab4f4e5497b.md @@ -214,11 +214,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); } diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66cf3639aca119b5c00b02d3.md b/curriculum/challenges/english/blocks/workshop-rps-game/66cf3639aca119b5c00b02d3.md index 1e38823bb35..1dd192517d5 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66cf3639aca119b5c00b02d3.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66cf3639aca119b5c00b02d3.md @@ -259,11 +259,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); } @@ -491,11 +491,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); } diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66d064c7d79408da050f8b2f.md b/curriculum/challenges/english/blocks/workshop-rps-game/66d064c7d79408da050f8b2f.md index 88e9ce02b6a..2c5c3a7d7c6 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66d064c7d79408da050f8b2f.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66d064c7d79408da050f8b2f.md @@ -218,11 +218,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); } diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66d068348ca093db469b4d59.md b/curriculum/challenges/english/blocks/workshop-rps-game/66d068348ca093db469b4d59.md index b3ef0d42b63..1851e336f29 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66d068348ca093db469b4d59.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66d068348ca093db469b4d59.md @@ -218,11 +218,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); } diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66d0746099f6f3de3678fd26.md b/curriculum/challenges/english/blocks/workshop-rps-game/66d0746099f6f3de3678fd26.md index d739c78a04f..78156cf10a3 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66d0746099f6f3de3678fd26.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66d0746099f6f3de3678fd26.md @@ -218,11 +218,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); } diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66d076040c7d1cdf36525af9.md b/curriculum/challenges/english/blocks/workshop-rps-game/66d076040c7d1cdf36525af9.md index 15ab66316bd..b59924c8b3a 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66d076040c7d1cdf36525af9.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66d076040c7d1cdf36525af9.md @@ -231,11 +231,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); } diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66d081d79b1d57e1b42caabf.md b/curriculum/challenges/english/blocks/workshop-rps-game/66d081d79b1d57e1b42caabf.md index c4e68dbb055..b19964e5433 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66d081d79b1d57e1b42caabf.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66d081d79b1d57e1b42caabf.md @@ -218,11 +218,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); } diff --git a/curriculum/challenges/english/blocks/workshop-rps-game/66d085d37aeffce2ef786de3.md b/curriculum/challenges/english/blocks/workshop-rps-game/66d085d37aeffce2ef786de3.md index 6f47673f5dc..357270a6755 100644 --- a/curriculum/challenges/english/blocks/workshop-rps-game/66d085d37aeffce2ef786de3.md +++ b/curriculum/challenges/english/blocks/workshop-rps-game/66d085d37aeffce2ef786de3.md @@ -195,11 +195,11 @@ function getRandomComputerResult() { return options[randomIndex]; } -function hasPlayerWonTheRound(player, computer) { +function hasPlayerWonTheRound(playerChoice, computerChoice) { return ( - (player === "Rock" && computer === "Scissors") || - (player === "Scissors" && computer === "Paper") || - (player === "Paper" && computer === "Rock") + (playerChoice === "Rock" && computerChoice === "Scissors") || + (playerChoice === "Scissors" && computerChoice === "Paper") || + (playerChoice === "Paper" && computerChoice === "Rock") ); }