// This file is part of Timmi. // // Timmi is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. #ifndef TIMMIPROTOCOL_HH #define TIMMIPROTOCOL_HH #include #include #include const std::string TIMMI_VERSION("'alpha'"); // Convert string (like 'C5') to Card structure // Returns NORANK, NOSUIT if not valid Card string_to_card(std::string description); // Convert card to string description std::string card_to_string(Card card); // Convert vector of tablecards to string std::string table_to_string(const std::vector &table); // Convert vector of cards to string std::string hand_to_string(const std::vector &hand); // Convert string to vector of tablecards // Omit leading "table" if present std::vector string_to_table(std::string line); // Convert string to vector of cards // Omit leading "hand" if present std::vector string_to_hand(std::string line); #endif