Commit 16cb81d7 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Use the inline features functions in the features module

parent 3363b49a
Pipeline #188859 passed with stages
in 38 minutes and 42 seconds
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tarot 0.4.2.83-ebdc-dirty\n"
"Report-Msgid-Bugs-To: vivien@planete-kraus.eu\n"
"POT-Creation-Date: 2019-11-13 22:10+0100\n"
"POT-Creation-Date: 2019-11-22 18:32+0100\n"
"PO-Revision-Date: 2019-11-13 21:16+0100\n"
"Last-Translator: Vivien Kraus <vivien@planete-kraus.eu>\n"
"Language-Team: French\n"
......
......@@ -291,56 +291,55 @@ features_arff_data (const TarotGame * game, const TarotGameEvent * added,
int s_trump_obvious_master;
size_t s_halfpoints;
int s_oudler;
TarotSuit order[4];
TarotCounter counter;
size_t ret = 0;
tarot_features_variant (game, &f_n_players, &f_with_call);
tarot_features_position (game, &f_trick, &f_position);
tarot_features_partner_known (game, &f_partner_known);
tarot_features_bid_minimum (game, &f_bid_minimum);
tarot_features_count_faces (game, &f_n_kings, &f_n_marriages,
&f_n_extended_marriages, &f_n_queens,
&f_n_knights);
tarot_features_count_minor (game, &f_n_shortest, &f_n_second_shortest,
&f_n_second_longest, &f_n_longest);
tarot_features_count_oudlers (game, &f_has_petit, &f_has_excuse,
&f_has_twentyone);
tarot_features_count_trumps (game, &f_n_trumps, &f_max_trump, &f_min_trump,
&f_q1_trumps, &f_q3_trumps, &f_median_trumps);
tarot_features_team (game, &f_team_attack, &f_team_defence);
tarot_features_trick_players (game, &f_n_trick_players_already_played,
&f_n_allies_after_last_opponent);
tarot_features_minor_suit (game, &f_play_called_suit, &f_play_n_times_lead,
&f_play_suit_remaining,
&f_play_suit_remaining_points,
&f_ally_may_be_minor_master,
&f_ennemy_may_be_minor_master);
tarot_features_trump (game, &f_n_trumps_remaining,
&f_ally_may_be_trump_master,
&f_ennemy_may_be_trump_master);
tarot_features_points (game, &f_n_halfpoints_in_trick,
&f_n_oudlers_in_trick);
tarot_strategy_bid (game, added, &s_bid);
tarot_strategy_outbid (game, added, &s_outbid);
tarot_strategy_call_by_length (game, added, &s_call_shortest,
&s_call_second_shortest,
&s_call_second_longest, &s_call_longest);
tarot_strategy_call_myself (game, added, &s_call_myself);
tarot_strategy_call_marriage (game, added, &s_call_marriage);
tarot_strategy_discard_save (game, added, &s_discard_queens,
&s_discard_knights, &s_discard_jacks);
tarot_strategy_discard_junk (game, added, &s_discard_junk);
tarot_strategy_discard_by_length (game, added, &s_discard_shortest,
&s_discard_second_shortest,
&s_discard_second_longest,
&s_discard_longest);
tarot_strategy_lead (game, added, &s_lead_called_suit, &s_lead_suit_length,
&s_lead_n_times_lead, &s_lead_trumps);
tarot_strategy_purity (game, added, &s_n_smaller_kept,
&s_n_greater_nonface_kept, &s_n_points_kept,
&s_n_greater_kept);
tarot_strategy_excuse (game, added, &s_play_excuse);
tarot_strategy_trump_master (game, added, &s_trump_master,
&s_trump_obvious_master);
tarot_strategy_play_points (game, added, &s_halfpoints, &s_oudler);
counter_initialize (&counter);
counter_load_from_game (&counter, game);
features_variant (game, &f_n_players, &f_with_call);
features_position (game, &f_trick, &f_position);
features_partner_known (game, &f_partner_known);
features_bid_minimum (game, &f_bid_minimum);
features_count_faces (game, &f_n_kings, &f_n_marriages,
&f_n_extended_marriages, &f_n_queens, &f_n_knights);
features_count_minor (game, &f_n_shortest, &f_n_second_shortest,
&f_n_second_longest, &f_n_longest, order);
features_count_oudlers (game, &f_has_petit, &f_has_excuse,
&f_has_twentyone);
features_count_trumps (game, &f_n_trumps, &f_max_trump, &f_min_trump,
&f_q1_trumps, &f_q3_trumps, &f_median_trumps);
features_team (game, &f_team_attack, &f_team_defence);
features_trick_players (game, &f_n_trick_players_already_played,
&f_n_allies_after_last_opponent);
features_minor_suit (game, &counter, &f_play_called_suit,
&f_play_n_times_lead, &f_play_suit_remaining,
&f_play_suit_remaining_points,
&f_ally_may_be_minor_master,
&f_ennemy_may_be_minor_master);
features_trump (game, &counter, &f_n_trumps_remaining,
&f_ally_may_be_trump_master, &f_ennemy_may_be_trump_master);
features_points (game, &f_n_halfpoints_in_trick, &f_n_oudlers_in_trick);
strategy_bid (game, added, &s_bid);
strategy_outbid (game, added, &s_outbid);
strategy_call_by_length (game, added, &s_call_shortest,
&s_call_second_shortest,
&s_call_second_longest, &s_call_longest);
strategy_call_myself (game, added, &s_call_myself);
strategy_call_marriage (game, added, &s_call_marriage);
strategy_discard_save (game, added, &s_discard_queens,
&s_discard_knights, &s_discard_jacks);
strategy_discard_junk (game, added, &s_discard_junk);
strategy_discard_by_length (game, added, &s_discard_shortest,
&s_discard_second_shortest,
&s_discard_second_longest, &s_discard_longest);
strategy_lead (game, &counter, added, &s_lead_called_suit,
&s_lead_suit_length, &s_lead_n_times_lead, &s_lead_trumps);
strategy_purity (game, added, &s_n_smaller_kept, &s_n_greater_nonface_kept,
&s_n_points_kept, &s_n_greater_kept);
strategy_excuse (game, added, &s_play_excuse);
strategy_trump_master (game, &counter, added, &s_trump_master,
&s_trump_obvious_master);
strategy_play_points (game, added, &s_halfpoints, &s_oudler);
if (encoded)
{
INT (f_n_players == 3);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment