Corrected map read, added in AI subroutines

The size of the map is now calculated and stored with the file read in.
The AI function pointers are now set up and ready to go