Beispiel #1
0
        public void handleUp(int x, int y)
        {
            if (lastClicked.position.X == 0)
            {
                Matrices.isSolved(matrix);
            }
            Sticker target = null;

            foreach (Sticker[] array in matrix)
            {
                foreach (Sticker sticker in array)
                {
                    sticker.reset();
                    if (sticker.hit(x, y))
                    {
                        target = sticker;
                    }
                }
            }
            if (lastClicked != null && target != null)
            {
                Matrices.makeMove(matrix, lastClicked, target);
            }
            lastClicked = null;
            cubeWatcher.notify();
        }
Beispiel #2
0
 public bool isSolved()
 {
     return(Matrices.isSolved(matrix));
 }