예제 #1
0
        public static Game SetUp()
        {
            var board = new BasePiece[8, 8];

            board[0, 1] = new Knight()
            {
                Color = Color.White, Location = new Vector(0, 1)
            };
            board[0, 6] = new Knight()
            {
                Color = Color.White, Location = new Vector(0, 6)
            };
            board[7, 1] = new Knight()
            {
                Color = Color.Black, Location = new Vector(7, 1)
            };
            board[7, 6] = new Knight()
            {
                Color = Color.Black, Location = new Vector(7, 6)
            };

            board[0, 2] = new Bishop()
            {
                Color = Color.White, Location = new Vector(0, 2)
            };
            board[0, 5] = new Bishop()
            {
                Color = Color.White, Location = new Vector(0, 5)
            };
            board[7, 2] = new Bishop()
            {
                Color = Color.Black, Location = new Vector(7, 2)
            };
            board[7, 5] = new Bishop()
            {
                Color = Color.Black, Location = new Vector(7, 5)
            };

            board[0, 0] = new Rook()
            {
                Color = Color.White, Location = new Vector(0, 0)
            };
            board[0, 7] = new Rook()
            {
                Color = Color.White, Location = new Vector(0, 7)
            };
            board[7, 0] = new Rook()
            {
                Color = Color.Black, Location = new Vector(7, 0)
            };
            board[7, 7] = new Rook()
            {
                Color = Color.Black, Location = new Vector(7, 7)
            };

            board[0, 4] = new King()
            {
                Color = Color.White, Location = new Vector(0, 4)
            };

            board[7, 4] = new King()
            {
                Color = Color.Black, Location = new Vector(7, 4)
            };

            board[0, 3] = new Squart()
            {
                Color = Color.White, Location = new Vector(0, 3)
            };
            board[7, 3] = new Squart()
            {
                Color = Color.Black, Location = new Vector(7, 3)
            };

            for (int i = 0; i < 8; i++)
            {
                board[1, i] = new Pawn()
                {
                    Color = Color.White, Location = new Vector(1, i)
                };
                board[6, i] = new Pawn()
                {
                    Color = Color.Black, Location = new Vector(6, i)
                };
            }

            Game Game = new Game();

            Game.History.Push(board);

            //makes the players
            comandRunner.createPlayers(Game);

            return(Game);
        }
예제 #2
0
        public static Game SetUp()
        {
            var board = new BasePiece[8, 8];

            board[0, 1] = new Knight()
            {
                Color = Color.White, Location = new Vector(0, 1)
            };
            board[0, 6] = new Knight()
            {
                Color = Color.White, Location = new Vector(0, 6)
            };
            board[7, 1] = new Knight()
            {
                Color = Color.Black, Location = new Vector(7, 1)
            };
            board[7, 6] = new Knight()
            {
                Color = Color.Black, Location = new Vector(7, 6)
            };

            board[0, 2] = new Bishop()
            {
                Color = Color.White, Location = new Vector(0, 2)
            };
            board[0, 5] = new Bishop()
            {
                Color = Color.White, Location = new Vector(0, 5)
            };
            board[7, 2] = new Bishop()
            {
                Color = Color.Black, Location = new Vector(7, 2)
            };
            board[7, 5] = new Bishop()
            {
                Color = Color.Black, Location = new Vector(7, 5)
            };

            board[0, 0] = new Rook()
            {
                Color = Color.White, Location = new Vector(0, 0)
            };
            board[0, 7] = new Rook()
            {
                Color = Color.White, Location = new Vector(0, 7)
            };
            board[7, 0] = new Rook()
            {
                Color = Color.Black, Location = new Vector(7, 0)
            };
            board[7, 7] = new Rook()
            {
                Color = Color.Black, Location = new Vector(7, 7)
            };

            board[0, 4] = new King()
            {
                Color = Color.White, Location = new Vector(0, 4)
            };
            board[0, 3] = new BombAssassin()
            {
                Color = Color.White, Location = new Vector(0, 3)
            };
            board[7, 4] = new King()
            {
                Color = Color.Black, Location = new Vector(7, 4)
            };
            board[7, 3] = new BombAssassin()
            {
                Color = Color.Black, Location = new Vector(7, 3)
            };

            for (int i = 0; i < 8; i++)
            {
                board[1, i] = new Pawn()
                {
                    Color = Color.White, Location = new Vector(1, i)
                };
                board[6, i] = new Pawn()
                {
                    Color = Color.Black, Location = new Vector(6, i)
                };
            }

            Game Game = new Game();

            Game.History.Push(board);
            Game.Players.Enqueue(new BasePlayer()
            {
                Name = "player1", Color = Color.White
            });
            Game.Players.Enqueue(new Murderer()
            {
                Name = "player2", Color = Color.Black
            });

            return(Game);
        }
예제 #3
0
        public Game SetUp()
        {
            var board = new Piece[8, 8];

            board[0, 1] = new Knight()
            {
                Color = Color.White, Location = new Vector(0, 1)
            };
            board[0, 6] = new Knight()
            {
                Color = Color.White, Location = new Vector(0, 6)
            };
            board[7, 1] = new Knight()
            {
                Color = Color.Black, Location = new Vector(7, 1)
            };
            board[7, 6] = new Knight()
            {
                Color = Color.Black, Location = new Vector(7, 6)
            };

            board[0, 2] = new Bishop()
            {
                Color = Color.White, Location = new Vector(0, 2)
            };
            board[0, 5] = new Bishop()
            {
                Color = Color.White, Location = new Vector(0, 5)
            };
            board[7, 2] = new Bishop()
            {
                Color = Color.Black, Location = new Vector(7, 2)
            };
            board[7, 5] = new Bishop()
            {
                Color = Color.Black, Location = new Vector(7, 5)
            };

            board[0, 0] = new Rook()
            {
                Color = Color.White, Location = new Vector(0, 0)
            };
            board[0, 7] = new Rook()
            {
                Color = Color.White, Location = new Vector(0, 7)
            };
            board[7, 0] = new Rook()
            {
                Color = Color.Black, Location = new Vector(7, 0)
            };
            board[7, 7] = new Rook()
            {
                Color = Color.Black, Location = new Vector(7, 7)
            };


            board[0, 4] = new King()
            {
                Color = Color.White, Location = new Vector(0, 4)
            };
            //board[0, 3] = new Queen() { Color = Color.White, Location = new Vector(0, 3) };
            board[7, 4] = new King()
            {
                Color = Color.Black, Location = new Vector(7, 4)
            };
            //board[7, 3] = new Queen() { Color = Color.black, Location = new Vector(7, 3) };



            for (int i = 0; i < 8; i++)
            {
                board[1, i] = new Pawn()
                {
                    Color = Color.White, Location = new Vector(1, i)
                };
                board[6, i] = new Pawn()
                {
                    Color = Color.Black, Location = new Vector(6, i)
                };
            }

            Game Game = new Game()
            {
                History = new System.Collections.Generic.Stack <Piece[, ]>()
            };

            Game.History.Push(board);

            return(Game);
        }