I had a difficulty in codes a ball collision in java. Is there anyone could help me to code it. Here the requirement:
1) There will be two balls in the same size.
2) They move randomly at constant speed until they meet each other.
3) Once collided, they move in a different direction.
4) And the balls will move slower (less velocity) before they collided.
I could appreciate more if anyone could help me in this. and I need an immediate response.