anchor.diff:  			{error, Reason}
   	end.
   
  +-spec update_state(GameId :: integer(), 
  +				   GameState :: integer()) -> {ok, GameState :: integer()} | 
  +				   							  {error, Reason :: string()}.
   update_state(GameId, GameState) ->
   	case mnesia:sync_transaction(fun() -> 
   										 [Game] = mnesia:wread(game, GameId), 
  
positive.code: 			{error, Reason}
  	end.
  
  win(GameId, WinnerId) ->
  	case mnesia:sync_transaction(fun() -> 
  									[Game] = mnesia:wread(game, GameId),
  
negative.code: -module(bc_game_model).
  -include("bc_model.hrl").
  
  -export(save/1, 
  		win_game/2, 
  		update_state/2).
  
  -spec save(Privacy :: integer()) -> {ok, GameId :: integer()} | 
  									{error, Reason :: string()}.
  save(Privacy) ->
  	Now = now(),
  	GameId = bc_model:gen_id(game),
  