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

Function getComputerChoice

Rock-Paper-Scissors-Game/script.js:4–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2const scores = {'computerScore':0 , 'playerScore':0}
3
4function getComputerChoice() {
5 let options = ['Rock','Paper','Scissors']
6 let n = Math.floor(Math.random()*3)
7
8 return options[n]
9}
10
11
12function getResult(playerChoice, computerChoice) {

Callers 1

onClickRPSFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected