Update Main Game Code

NEEDS TWEAKING! problem with algorithm...