Code to migrate:
var moves = []; for (var i = 0; i < availSpots.length; i++){ var move = {}; move.index = newBoard[availSpots[i]]; newBoard[availSpots[i]] = player; if (player == aiPlayer){ var result = minimax(newBoard, huPlayer); move.score = result.score; } else{ var result = minimax(newBoard, aiPlayer); move.score = result.score; } newBoard[availSpots[i]] = move.index; moves.push(move); I can't translate this all into C # code because of a bunch of var. For example, how can you translate code
var moves = []; , if it is an array of objects with properties of the score (Although it may be something said wrong, the head already hurts from this suffering.