code refactored. Game engine now runs on a hash replacing ugly if/else engine