Added main game loop
Added throttle to the amount of ticks per second.
Added repaint. It still has flickering.