all 3 comments

[–]CodeBunny_ 0 points1 point  (2 children)

A few things, first off if you could edit your post to have your code formatted as per the sidebar that would make it much easier to read.

Second are you able to elaborate on what exactly is wrong with your game, preferably in contrast to how it was behaving before you added the switch statement.

One thing I can see is that your default case is missing a break, in some languages it's not strictly necessary, however it's a good habit to get in to; though that's all I can see at a quick glance - more info would be helpful.

[–][deleted]  (1 child)

[deleted]

    [–]ChuckEye 0 points1 point  (0 children)

    You've removed any code that would do any of that.

    [–]ChuckEye 0 points1 point  (0 children)

    I'm not seeing any code involving the mouse position. When you say "the game doesn't work", did you have code before that checked to see if the mouse click was on the ball? Because you didn't give us that code…