Пример #1
0
        public ChineseChessAgent(Int16 team, List <ChineseChessPiece> myPieces)
        {
            Team = team;
            if (myPieces != null)
            {
                MyPieces = myPieces;
            }
            else
            {
                MyPieces = (team == 1) ? ChineseChessGame.GetInitRedPieces() : ChineseChessGame.GetInitBlackPieces();
            }

            BoardState  = new Dictionary <ChineseChessPosition, bool>();
            MyPiecesDic = new Dictionary <string, ChineseChessPosition>();
        }
Пример #2
0
 public void ComputeLegalMoves()
 {
     LegalMoves = ChineseChessGame.AllPossibleMoves(MyPieces, BoardState, Team);
 }
Пример #3
0
        public ChineseChessStatusEnum?GetEndStatus()
        {
            var playing = PlayingTeam == 1 ? RedAgent : BlackAgent;

            return(ChineseChessGame.GetGameEndStatus(playing));
        }