Xtreme collisions

This is the answer for problem H of IEEEXtreme 5.0, I did not attempt this one on the competition and now feel bad about it! Nevertheless it can have defects still. If you find any please let me know. I haven’t completely finished it as a submission, so please make sure of these before you use the source.

1. Make sure you make a “ball” object for every ball.

2. Make sure you push_back those balls on to the list in a sorted manner from South most(position=0) ball to the North most ball; it only checks the nearest balls for collisions.

PS: All of the balls’ positions are updated even though the question asks for only a specified ball’s position.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s