#include #include #include #include #include class Board { public: Board(int w, int h): width(w), height(h), pos_x(0), pos_y(0), sel_x(0), sel_y(0), selected(false), count_close(width*height) { int i; cards = new card*[width]; for( i=0 ; i=0) && (x=0) && (ych = ch; free_list[index] = free_list[--count_free]; // вторая карта index = rand()%count_free; free_list[index]->ch = ch; free_list[index] = free_list[--count_free]; } } /********************************************/ void refresh() { int x, y; for( y=0 ; y