added source files for ai player and I/O functions.  formatted the functions with appropriate tabs, spaces, braces and line breaks etc