Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 public Word(int ID, int[] indices, GameSquare[] squares)
 {
     this.ID = ID;
     this.indices = indices;
     this.GameSquares = squares;
 }