Barrels and bombs spawn in random locations when the program is reset. When the program starts, the ball begin moving on its own. It will bounce of the edges and barrels in a random direction when it collides with them. If it collides with a bomb, the program ends.