MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / playTicTacToe_copyBoard

Method playTicTacToe_copyBoard

code/main/ATree.ts:105–116  ·  view source on GitHub ↗
(board: ATreeTicTacToeSign[][])

Source from the content-addressed store, hash-verified

103 }
104
105 private playTicTacToe_copyBoard(board: ATreeTicTacToeSign[][]): ATreeTicTacToeSign[][]{
106 // Create the new board
107 var newBoard: ATreeTicTacToeSign[][] = [];
108
109 // Copy the old one in the new one
110 for(var i = 0; i < board.length; i++){
111 newBoard.push(board[i].slice(0));
112 }
113
114 // Return the new board
115 return newBoard;
116 }
117
118 private playTicTacToe_evaluateBoard(board: ATreeTicTacToeSign[][]): number{
119 // The score

Callers 1

playTicTacToe_minimaxMethod · 0.95

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected