MCPcopy Create free account
hub / github.com/codemistic/Web-Development / onClickRPS

Function onClickRPS

Rock-Paper-Scissors-Game/script.js:52–57  ·  view source on GitHub ↗
(playerChoice)

Source from the content-addressed store, hash-verified

50
51// ** Calculate who won and show it on the screen **
52function onClickRPS(playerChoice) {
53 const computerChoice = getComputerChoice()
54 const score = getResult(playerChoice.value,computerChoice)
55 scores['playerScore'] += score
56 showResult(score, playerChoice.value,computerChoice)
57}
58
59
60// ** Make the RPS buttons actively listen for a click and do something once a click is detected **

Callers 1

playGameFunction · 0.85

Calls 3

getComputerChoiceFunction · 0.85
getResultFunction · 0.70
showResultFunction · 0.70

Tested by

no test coverage detected