Exemple #1
0
        private void MovePaddle(object direction)
        {
            int movementValue = Paddle.CheckDirection(direction.ToString());

            Paddle.MovePaddle(movementValue);
            NotifyPropertyChanged("PaddlePositionX");
        }
Exemple #2
0
        private bool CanMovePaddle(object parameter)
        {
            const int BOUNDARY         = MainCanvas.WIDTH;
            int       valueOfDirection = Paddle.CheckDirection(parameter.ToString());

            return(CanPaddleMoveLeft(valueOfDirection) || CanPaddleMoveRight(valueOfDirection, BOUNDARY));
        }