private void MovePaddle(object direction) { int movementValue = Paddle.CheckDirection(direction.ToString()); Paddle.MovePaddle(movementValue); NotifyPropertyChanged("PaddlePositionX"); }
private bool CanMovePaddle(object parameter) { const int BOUNDARY = MainCanvas.WIDTH; int valueOfDirection = Paddle.CheckDirection(parameter.ToString()); return(CanPaddleMoveLeft(valueOfDirection) || CanPaddleMoveRight(valueOfDirection, BOUNDARY)); }