#include #include using namespace std; using coordinate = std::pair; using hexagon = std::string; int main() { Tile b1{"b1"}; b1.create_hexagon(coordinate{0, 0}, hexagon{"HXOX"}); b1.print_hexagon(coordinate{0, 0}); b1.push(coordinate{0, 0}, 'O'); b1.create_hexagon(coordinate{0, 1}, hexagon{"OXXXH"}); b1.print_tile(); } // coordinate and hexagon that are used in the main program above is // just an alias for std::pair and std::string respectively. // See the using-directive on line 5 and 6. If we did not create these // aliases the main program would be: // int main() // { // Tile b1{"b1"}; // b1.create_hexagon(pair{0, 0}, string{"HXOX"}); // b1.print_hexagon(pair{0, 0}); // b1.push(pair{0, 0}, 'O'); // b1.create_hexagon(pair{0, 1}, string{"OXXXH"}); // b1.print_tile(); // }