Exemplo n.º 1
0
        public static Piece InstantiateNew(ChessPieceType pieceType, PieceTeam team)
        {
            Piece newPiece = InstantiateNew(pieceType);

            newPiece.Team = team;
            return(newPiece);
        }
Exemplo n.º 2
0
        public Player(ChessGame game, PieceTeam team)
        {
            Game = game;
            Team = team;

            game.OnTurnChange += OnTurnChange;
        }
Exemplo n.º 3
0
        public TeamT GetTeam(PieceTeam team)
        {
            switch (team)
            {
            case PieceTeam.White:
                return(whiteTeam);

            case PieceTeam.Black:
                return(blackTeam);

            case PieceTeam.None:
            default:
                return(null);
            }
        }
Exemplo n.º 4
0
        public void Initialize(ChessGame game, PieceTeam team)
        {
            this.Team = team;
            switch (type)
            {
            case Type.Player:
                break;

            case Type.MinMax:
                playerModel = new Player.AI.ChessMinMaxAI(game, team);
                playerModel.OnMovementDecided += OnDecideMovement;
                break;

            default:
                throw new NotImplementedException();
            }
        }
Exemplo n.º 5
0
 public ChessMinMaxAI(ChessGame game, PieceTeam team, int maxTurnsDepth = 3, float maxCalculationTime = 5f)
     : base(game, team)
 {
     MaxTurnsDepth      = maxTurnsDepth;
     MaxCalculationTime = maxCalculationTime;
 }
Exemplo n.º 6
0
 public ChessAI(ChessGame game, PieceTeam team) : base(game, team)
 {
 }
Exemplo n.º 7
0
 public MirroredPiecesEntry(PieceTeam team, BoardVector position) : base(team)
 {
     this.position = position;
 }
Exemplo n.º 8
0
 public Pawn(PieceTeam team)
 {
     PieceTeam = team;
 }
Exemplo n.º 9
0
 public MirroredPiecesEntry(PieceTeam team, int horizontal, int vertical)
     : this(team, new BoardVector(horizontal, vertical))
 {
 }
Exemplo n.º 10
0
 public RowPiecesEntry(PieceTeam team, int height) : base(team)
 {
     this.height = height;
 }
Exemplo n.º 11
0
 public SinglePieceEntry(PieceTeam team, BoardVector startPosition) : base(team)
 {
     this.position = startPosition;
 }
Exemplo n.º 12
0
 public SinglePieceEntry(PieceTeam team, int horizontal, int vertical)
     : this(team, new BoardVector(horizontal, vertical))
 {
 }
Exemplo n.º 13
0
 public PieceEntry(PieceTeam team)
 {
     this.team = team;
 }