anyone knows how to make a simple program for a pool game . ( i only need 1 ball and 1 hole here).
The ball will connect with a line and a mouse.
the mouse will decide the direction for the ball to move to the hole.
Maybe I wasn't clear... We've helped you enough. You're going to have to at least try to add the other features you want yourself. Post the code of your attempt for more help.
Answers
That should be more than enough to get you started.
what about hit the ball and make it move to the hole. it will bound if it touches the edge
TfGuy44 gave you a great starting point. Try looking thru the examples and write some code. Look here: https://processing.org/examples/bounce.html
Maybe I wasn't clear... We've helped you enough. You're going to have to at least try to add the other features you want yourself. Post the code of your attempt for more help.
actually, the code you wrote is quite advance, i just take a look at it and have some sort of idea to make my game. thanks for sharing tho.