reworked rendering game content (first, the necessary parts of the screan are
cleared, and then the new state is computed and printed to the screen)
added collisions