anchor.diff:  
   %Can always play supply cards
   check_allowed(_Phase, Player, _CurPlayer,
  -              {Player, hand, _Id}, #card{type=supply}, {Player, discard}, _Game) ->
  +              {Player, hand, _Id}, #card_def{type=supply}, {Player, discard}, _Game) ->
     allowed;
   %Can deploy units on own deploy phase
   %If have enough supply for card
   check_allowed(deploy, Player, Player,
  -              {Player, hand, _Id}, #card{cost=Cost, type=unit}, {Player, field}, Game) ->
  +              {Player, hand, _Id}, #card_def{cost=Cost, type=unit}, {Player, field}, Game) ->
     #player{supply=Supply} = get_player(Game, Player),
     case Supply of
       Supply when Supply >= Cost -> allowed;
  
positive.code: 
  play_card_if_allowed(not_allowed, _Card, _From, _To, Game) ->
    Game;
  play_card_if_allowed(allowed, #card{type=unit, cost=Cost}, 
                       From, {Player, field}=To, #game{}=Game) ->
    {Card, RemovedGame} = remove_card(Game, From),
    PaidSupply = add_supply(Player, - Cost, RemovedGame),
    add_card(PaidSupply, Card, To);
  play_card_if_allowed(allowed, #card{type=supply, attrs=Attrs}, 
                       From, {Player, discard}=To, #game{}=Game) ->
    {supply, Supply} = lists:keyfind(supply, 1, Attrs),
    {Card, RemovedGame} = remove_card(Game, From),
  
negative.code:   Supply ++  Units.
  
  supply_card() ->
    #card_def{key = supply1, attrs=[ {supply, 1 } ]}.
  soldier_card() ->
    #card_def{key = soldier, cost = 1, type = unit, attrs=[ {attack, 1}, {defense, 1} ]}.
  
  test_player(Id) ->
    #player{id= Id, deck=shuffle_list(test_deck())}.
  
  init_card_defs() ->
    card_defs = ets:new(card_defs, [public, named_table, {keypos, #card_def.key}]),
    ets:insert(card_defs, supply_card()),
    ets:insert(card_defs, soldier_card()).
  
  get_card(Id) ->
    [#card_def{} = Card] =  ets:lookup(card_defs, Id),
    Card.
  
  new_game() ->
  