Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ttt_field2d_.h"
- TTT_field2d_::TTT_field2d_()
- {
- for ( int h = 0; h < HIGTH; ++h)
- {
- for (int w = 0; w < WIDTH; ++w)
- FIeld[h][w] = 0;
- }
- }
- void TTT_field2d_::place (int _h, int _w, int _player)
- {
- ;
- }
- void TTT_field2d_::AImove()
- {
- ;
- }
- void TTT_field2d_::check()
- {
- ;
- }
- int TTT_field2d_::ret(int _h, int _w)
- {
- return FIeld[_h][_w];
- }
- std::ostream & operator<< (std::ostream & os, const TTT_field2d_ &_field )
- {
- for ( int h = 0; h < _field.HIGTH; ++h)
- {
- for (int w = 0; w < _field.WIDTH; ++w)
- {
- if ( _field.FIeld[h][w] == 0)
- os << " ";
- else if (_field.FIeld[h][w] == 1)
- os << "x";
- else if (_field.FIeld[h][w] == 2)
- os << "o";
- }
- }
- os << std::endl;
- return os;
- }
Advertisement
Add Comment
Please, Sign In to add comment