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

Function startNewGame

Tic-tac-toe using JS/scripts/game.js:22–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21
22function startNewGame(){
23 if(player[0].name===''|| player[1].name=== ''){
24 alert('Please set custom player names for both players');
25 return;
26 }
27 activePlayerNameElement.textContent=player[activePlayer].name;
28 gameAreaElement.style.display="block";
29 resetGameStatus();
30}
31
32function switchPlayer(){
33 if(activePlayer===0){

Callers

nothing calls this directly

Calls 1

resetGameStatusFunction · 0.85

Tested by

no test coverage detected