Ejemplo n.º 1
0
 internal void GestureInterpreter(GestureInterpreter gestureController)
 {
     beforeMove = ExportGame();
     if (gestureController.IsGestureDirectionTop())
     {
         MoveTop();
     }
     else if (gestureController.IsGestureDirectionBottom())
     {
         MoveBottom();
     }
     else if (gestureController.IsGestureDirectionLeft())
     {
         MoveLeft();
     }
     else if (gestureController.IsGestureDirectionRight())
     {
         MoveRight();
     }
     else if (gestureController.IsGestureDirectionUp())
     {
         MoveUp();
     }
     else if (gestureController.IsGestureDirectionDown())
     {
         MoveDown();
     }
 }
Ejemplo n.º 2
0
        public GamePage()
        {
            this.InitializeComponent();

            mainController    = new Controller.GameController(ref this.MainBoard, ref this.BestScoreNumber, ref this.ActualScoreNumber);
            gestureController = new Controller.GestureInterpreter();

            this.NavigationCacheMode = NavigationCacheMode.Required;
            GestureInputProcessor(gestureRecognizer, this.MainBoard);
        }