Example #1
0
        public static Piece InstantiateNew(ChessPieceType pieceType, PieceTeam team)
        {
            Piece newPiece = InstantiateNew(pieceType);

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

            game.OnTurnChange += OnTurnChange;
        }
Example #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);
            }
        }
        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();
            }
        }
Example #5
0
 public ChessMinMaxAI(ChessGame game, PieceTeam team, int maxTurnsDepth = 3, float maxCalculationTime = 5f)
     : base(game, team)
 {
     MaxTurnsDepth      = maxTurnsDepth;
     MaxCalculationTime = maxCalculationTime;
 }
Example #6
0
 public ChessAI(ChessGame game, PieceTeam team) : base(game, team)
 {
 }
Example #7
0
 public MirroredPiecesEntry(PieceTeam team, BoardVector position) : base(team)
 {
     this.position = position;
 }
Example #8
0
 public Pawn(PieceTeam team)
 {
     PieceTeam = team;
 }
Example #9
0
 public MirroredPiecesEntry(PieceTeam team, int horizontal, int vertical)
     : this(team, new BoardVector(horizontal, vertical))
 {
 }
Example #10
0
 public RowPiecesEntry(PieceTeam team, int height) : base(team)
 {
     this.height = height;
 }
Example #11
0
 public SinglePieceEntry(PieceTeam team, BoardVector startPosition) : base(team)
 {
     this.position = startPosition;
 }
Example #12
0
 public SinglePieceEntry(PieceTeam team, int horizontal, int vertical)
     : this(team, new BoardVector(horizontal, vertical))
 {
 }
Example #13
0
 public PieceEntry(PieceTeam team)
 {
     this.team = team;
 }