Skip to content
Snippets Groups Projects
Commit 67986672 authored by Subliminal Guy's avatar Subliminal Guy
Browse files

Fix Naming Issue

parent 037290ed
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ let computerScore = 0;
const playerScoreElement = document.getElementById("player-score")
const computerScoreElement = document.getElementById("computer-score")
const roundResultsMessage = document.getElementById("results-message")
const roundResultsMessage = document.getElementById("results-msg")
function getRandomComputerResult(){
const number = Math.floor(Math.random()*options.length);
......@@ -21,6 +21,7 @@ function hasPlayerWonTheRound(player, computer){
}
function getRoundResults(playerChoice){
const computerChoice = getRandomComputerResult()
const playerWon = hasPlayerWonTheRound(playerChoice, computerChoice);
if(playerWon){
......@@ -34,4 +35,11 @@ function getRoundResults(playerChoice){
}
}
console.log(document)
function showResults(playerChoice) {
roundResultsMessage.innerText = getRoundResults(playerChoice)
playerScoreElement.innerText = playerScore;
computerScoreElement.innerText = computerScore;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment