Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function Position(){
this.Board = [];
this.Capture = [];
this.Capture[0] = [];
this.Capture[1] = [];
this.FuFlg = [];
this.FuFlg[0] = [];
this.FuFlg[1] = [];
for(var i = 0; i <= 10; i++){
this.Board[i] = [];
for(var j = 0; j <= 10; j++){
this.Board[i][j] = OUT_OF_BOARD;
}
}
for(var i = 1; i <= 9; i++){
for(var j = 1; j <= 9; j++){
this.Board[i][j] = EMPTY;
}
}
for(var piece = FU; piece <= HI; piece++){
this.Capture[0][piece] = EMPTY;
this.Capture[1][piece] = EMPTY;
}
for(var i = 1; i <= 9; i++){
this.FuFlg[0][i] = false;
this.FuFlg[1][i] = false;
}
this.turn = true;
this.blackKingPos = new PiecePos(0,0);
this.whiteKingPos = new PiecePos(0,0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.