ttt_meta_session.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // Created by nositelshtanov on 11/11/2023.
  3. //
  4. #ifndef TTT_TTT_META_SESSION_H
  5. #define TTT_TTT_META_SESSION_H
  6. #include <iostream>
  7. #include "ttt_meta.h"
  8. #define META_X_INVITATION_TWO_PARAMS "X step (write two coordinates):"
  9. #define META_O_INVITATION_TWO_PARAMS "O step (write two coordinates):"
  10. #define META_X_INVITATION_ONE_PARAM "X step (write a coordinate):"
  11. #define META_O_INVITATION_ONE_PARAM "O step (write a coordinate):"
  12. #define META_INVALID_COORS_HNDL "Invalid coordinates"
  13. #define META_FIELD_IS_OCCUPIED_HNDL "the field is alredy occupied"
  14. #define META_CROSS_WIN "X wins!!!"
  15. #define META_ZERO_WIN "O wins!!!"
  16. #define META_DRAW "Draw!!!"
  17. #define META_DEVIDER " --------- --------- --------- \n"
  18. #define META_MAP_BORDER "|"
  19. #define META_MAP_CROSS " X "
  20. #define META_MAP_ZERO " O "
  21. #define META_MAP_NOTHING " "
  22. #define META_MAP_MAY_SELECT "( )"
  23. #define META_CROSS_FILL "XXX"
  24. #define META_ZERO_FILL "OOO"
  25. class ttt_meta_session {
  26. public:
  27. void play();
  28. void draw_map();
  29. private:
  30. static void print_devider() { std::cout << META_DEVIDER; }
  31. void print_ln(std::size_t fields_row);
  32. ttt_meta game;
  33. };
  34. #endif //TTT_TTT_META_SESSION_H