Link() public method

public Link ( Square neighbour, Direction dir ) : void
neighbour Square
dir Direction
return void
Esempio n. 1
0
        private void SetLink(Square square, Direction dir, int x, int y)
        {
            int    dirX      = (width + x + dir.DeltaX) % width;
            int    dirY      = (height + y + dir.DeltaY) % height;
            Square neighbour = grid[dirX, dirY];

            square.Link(neighbour, dir);
        }
 private void SetLink(Square square, Direction dir, int x, int y)
 {
     int dirX = (width + x + dir.DeltaX) % width;
     int dirY = (height + y + dir.DeltaY) % height;
     Square neighbour = grid[dirX, dirY];
     square.Link(neighbour, dir);
 }