示例#1
0
文件: Piece.cs 项目: kbarrett/Tantrix
 public void CheckAdjacentPieces(Board board)
 {
     checkAbove(board);
     checkLeftTop(board);
     checkBelow(board);
     checkLeftBottom(board);
     checkRightTop(board);
     checkRightBottom(board);
 }
示例#2
0
文件: Game1.cs 项目: kbarrett/Tantrix
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

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

            board = new Board(numberOfPlayers);

            IsMouseVisible = true;

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