Sat May 27 14:39:00 UTC 2023 inscode

上级 361ad24e
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<body> <body>
<div id="result"> <div id="result">
<div id="players"> <div id="players">
<div id="player-icon" class="player">😶</div> <div id="player-icon" class="player"></div>
<div id="computer-icon" class="player">🤖️</div> <div id="computer-icon" class="player"></div>
</div> </div>
<div id="choices"></div> <div id="choices"></div>
<div id="outcome"></div> <div id="outcome"></div>
......
...@@ -21,12 +21,10 @@ function playTurn(choice) { ...@@ -21,12 +21,10 @@ function playTurn(choice) {
const outcomeMessage = determineOutcome(playerChoice, computerChoice); const outcomeMessage = determineOutcome(playerChoice, computerChoice);
document.getElementById("choices").innerHTML = iconsHTML; document.getElementById("choices").innerHTML = iconsHTML;
document.getElementById("outcome").innerHTML = outcomeMessage; document.getElementById("outcome").innerHTML = outcomeMessage;
const playerIcon = document.querySelector("#player-icon div"); const playerIcon = document.getElementById("player-icon");
playerIcon.style.color = "#3498db"; playerIcon.innerHTML = '😊'
playerIcon.style.fontSize = "6rem"; const computerIcon = document.getElementById("computer-icon");
const computerIcon = document.querySelector("#computer-icon div"); computerIcon.innerHTML = '🤖️'
computerIcon.style.color = "#e74c3c";
computerIcon.style.fontSize = "6rem";
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册