Added functioning single player AI. Ready for merge back to master