#ifndef _LABERINT_HPP #define _LABERINT_HPP #include #include #include #include #include "cambra.hpp" using util::nat; typedef pair posicio; class laberint { public: explicit laberint(nat num_fil=5, nat num_col=5) throw(error); explicit laberint(istream& is) throw(error); laberint(const laberint & l) throw(error); laberint & operator=(const laberint & l) throw(error); virtual ~laberint() throw(error); nat num_files() const throw(); nat num_columnes() const throw(); const cambra operator()(const posicio& pos) const throw(error); void obre_porta(paret p, const posicio& pos) throw(error); void tanca_porta(paret p, const posicio& pos) throw(error); virtual void print(ostream& s) const throw(); static const char nom_mod[] = "laberint"; static const int FilsColsIncorrecte = 31; static const int PosicioInexistent = 32; static const int PortaExterior= 33; static const char MsgFilsColsIncorrecte[] = "El num de fils o cols es incorrecte."; static const char MsgPosicioInexistent[] = "La posició no existeix"; static const char MsgPortaExterior[] = "No es pot obrir una porta a l'exterior"; private: #include "laberint.rep" }; #endif