Sat May 27 14:39:00 UTC 2023 inscode

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