gamelogic works, but this code is awfull. :-(