예제 #1
0
파일: Player.cs 프로젝트: ngapham/ChessGame
 private void ExecuteByComputer()
 {
     MoveByComputer move = new MoveByComputer(this.color);
     move.run();
     for (int i = 0; i < 120; i++)
         GameControl.board[i] = move.board[i];
     nextPlayer();
 }
예제 #2
0
파일: State.cs 프로젝트: ngapham/ChessGame
 public State(int _player)
 {
     this.player = _player;
     this.board = new int[120];
     for (int i = 0; i < 120; i++)
         board[i] = GameControl.board[i]; //board nay la tam thoi, thuc te e copy vao Move.cs va MoveByComputer.cs de lay board dang choi
     // Sua de them lua chon choi voi nguoi hoac choi voi may nhe
     moveByComputer = new MoveByComputer(player);
 }