#ifndef GAMEH #define GAMEH #include #include #include "terminal.h" using namespace std; class wabbit; //forward declaration class game { const terminal term; typedef list master_t; master_t master; wabbit *get(unsigned x, unsigned y) const; master_t::size_type count(char) const; public: class corrupt: public fatal { const char c; const unsigned x, y; void print(ostream& ost) const throw() { ost << "bad char " << c << " at coordinates (" << x << ", " << y << ")"; } public: corrupt(char initial_c, unsigned initial_x, unsigned initial_y) throw(): c(initial_c), x(initial_x), y(initial_y) {} }; game(char initial_c = '.') throw(terminal::unprintable): term(initial_c) {} ~game(); void populate() throw (fatal, exception); void play(); friend class wabbit; }; #endif