Removed points in case of Tie
This commit is contained in:
		
							parent
							
								
									807ce0487b
								
							
						
					
					
						commit
						b83b1ed631
					
				
							
								
								
									
										2
									
								
								index.js
								
								
								
								
							
							
						
						
									
										2
									
								
								index.js
								
								
								
								
							| 
						 | 
					@ -11,8 +11,6 @@ function playRound(playerChoice, computerChoice) {
 | 
				
			||||||
    let computerChoiceCapital = computerChoice.slice(0,1).toUpperCase() + computerChoice.slice(1,computerChoice.length)
 | 
					    let computerChoiceCapital = computerChoice.slice(0,1).toUpperCase() + computerChoice.slice(1,computerChoice.length)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (playerChoice == computerChoice) {
 | 
					    if (playerChoice == computerChoice) {
 | 
				
			||||||
        points.playerAddPoints();
 | 
					 | 
				
			||||||
        points.computerAddPoints();
 | 
					 | 
				
			||||||
        return `It's a tie! ${playerChoiceCapital} vs ${computerChoiceCapital}.`;
 | 
					        return `It's a tie! ${playerChoiceCapital} vs ${computerChoiceCapital}.`;
 | 
				
			||||||
    } else if ((playerChoice == "rock" && computerChoice == "paper")
 | 
					    } else if ((playerChoice == "rock" && computerChoice == "paper")
 | 
				
			||||||
            || (playerChoice == "paper" && computerChoice == "scissors")
 | 
					            || (playerChoice == "paper" && computerChoice == "scissors")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue