ported most main.c code to game.sats;

improved abstraction, but in conflicting state - need to change function signatures to reflect stateful/localized functions in game.dats