public static bool IsValidNextSquare(GameSquare current, GameSquare next) { bool value = false; try { value = Math.Abs(next.x - current.x) <= 1 && Math.Abs(next.y - current.y) <= 1; } catch { } return value; }
public static void SetSquare(string letter, int value, int c, int r, int index) { GameSquare sq = new GameSquare(letter, value, new Rectangle(c * (boxSize + boxPadding), r * (boxSize + boxPadding), boxSize, boxSize), Color.Blue, c, r, index); WordGame.squares2[index] = sq; WordGame.squares[c, r] = sq; }
public Word(int ID, int[] indices, GameSquare[] squares) { this.ID = ID; this.indices = indices; this.GameSquares = squares; }