Moved game state functionality to api class

Moved game state class away from ai class and placed it in api class
instead. This is done in interest of refactoring the ai out of the
package and releasing the api as a stand alone package.