Beispiel #1
0
 public void CheckAdjacentPieces(Board board)
 {
     checkAbove(board);
     checkLeftTop(board);
     checkBelow(board);
     checkLeftBottom(board);
     checkRightTop(board);
     checkRightBottom(board);
 }
Beispiel #2
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            graphics.PreferredBackBufferHeight = screenHeight;
            graphics.PreferredBackBufferWidth = screenWidth;

            board = new Board(numberOfPlayers);

            IsMouseVisible = true;

            Content.RootDirectory = "Content";
        }
Beispiel #3
0
 private void checkRightTop(Board board)
 {
     Piece temp = righttop;
     righttop = board.getPieceOnScreen(location + RightTopOffSet);
     if (temp == null && righttop != null) { righttop.CheckAdjacentPieces(board); }
 }
Beispiel #4
0
 private void checkRightBottom(Board board)
 {
     Piece temp = rightbottom;
     rightbottom = board.getPieceOnScreen(location + RightBottomOffSet);
     if (temp == null && rightbottom != null) { rightbottom.CheckAdjacentPieces(board); }
 }
Beispiel #5
0
 private void checkLeftTop(Board board)
 {
     Piece temp = lefttop;
     lefttop = board.getPieceOnScreen(location + LeftTopOffSet);
     if (temp == null && lefttop != null) { lefttop.CheckAdjacentPieces(board); }
 }
Beispiel #6
0
 private void checkLeftBottom(Board board)
 {
     Piece temp = leftbottom;
     leftbottom = board.getPieceOnScreen(location + LeftBottomOffSet);
     if (temp == null && leftbottom != null) { leftbottom.CheckAdjacentPieces(board); }
 }
Beispiel #7
0
 private void checkBelow(Board board)
 {
     Piece temp = below;
     below = board.getPieceOnScreen(location + BelowOffSet);
     if (temp == null && below != null) { below.CheckAdjacentPieces(board); }
 }
Beispiel #8
0
 private void checkAbove(Board board)
 {
     Piece temp = above;
     above = board.getPieceOnScreen(location + AboveOffSet);
     if (temp == null && above != null) { above.CheckAdjacentPieces(board); }
 }