working version of the API

uses states for handeling the game
indepent views are possible
fixed player errors