   alias Evolution.Game
   alias Evolution.Repo
   alias Evolution.UserGame
+  alias Evolution.UserGameAnimal
   import Ecto.Query
 
   def start_link(%Game{fsm_state: fsm_state} = game) do

    |> preload([g, p], [players: p])
    |> Repo.one
  end
end


  def put_card(fsm, user, card) when is_integer(card), do: :gen_statem.call(fsm, {:create_animal, user, card})

  def put_card(fsm, user, {from_index, property, to_index})
  when is_integer(from_index) and is_binary(property) and is_integer(to_index) do
    :gen_statem.call(fsm, {:put_card, user, {from_index, property, to_index}})
  end

  # add support for cooperation
