Minimax AI + Fixes

Made a simple, naive minimax AI. Started fixing stack corruption bugs
with sscanf. Started removing global variables.