fixed logic

logic works as desired. Now I just need to make it look like a game.