00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __CALLE__
00026 #define __CALLE__
00027
00028 #include "cadenas.h"
00029 #include "propiedad.h"
00030 #include <string>
00031 using namespace std;
00032
00033
00034 class calle : public propiedad {
00035
00036 private:
00037
00038 long _alquilerBase;
00039 long _alquilerUnaCasa;
00040 long _alquilerDosCasas;
00041 long _alquilerTresCasas;
00042 long _alquilerCuatroCasas;
00043 long _alquilerHotel;
00044 bool _permisoConstruccion;
00045
00046 int _precioCasa;
00047 int _precioHotel;
00048 int _numCasas;
00049 int _numHoteles;
00050
00051
00052 banca *_banca;
00053 public:
00054
00055
00056 calle ();
00057 calle ( int numero, string nombre, string nombreCorto, long precio, long hipoteca,
00058 bool hipotecado, bool hipotecable, long alquilerBase, long alquilerUnaCasa,
00059 long alquilerDosCasas, long alquilerTresCasas, long alquilerCuatroCasas,
00060 long alquilerHotel, bool permisoConstruccion, int precioCasa, int precioHotel,
00061 int numCasas, int numHoteles, banca *b, propietario *p );
00062
00063
00064 calle (const calle& right);
00065
00066
00067 calle& operator= (const calle& right);
00068 bool operator< ( calle compara );
00069 bool operator!= ( calle compara );
00070 bool operator== ( calle compara );
00071 friend ostream& operator<< ( ostream& os, calle *c );
00072
00073
00074 ~calle ();
00075
00076
00077 long get_alquilerBase () const;
00078 long get_alquilerUnaCasa () const;
00079 long get_alquilerDosCasas () const;
00080 long get_alquilerTresCasas () const;
00081 long get_alquilerCuatroCasas () const;
00082 long get_alquilerHotel () const;
00083 bool get_permisoConstruccion () const;
00084 int get_precioCasa () const;
00085 int get_precioVentaCasa () const;
00086 int get_precioHotel () const;
00087 int get_precioVentaHotel () const;
00088 int get_numCasas () const;
00089 int get_numHoteles () const;
00090 banca *get_banca () const;
00091
00092
00093 void set_alquilerBase ( long alquilerBase );
00094 void set_alquilerUnaCasa ( long alquilerUnaCasa );
00095 void set_alquilerDosCasas ( long alquilerDosCasas );
00096 void set_alquilerTresCasas ( long alquilerTresCasas );
00097 void set_alquilerCuatroCasas ( long alquilerCuatroCasas );
00098 void set_alquilerHotel ( long alquilerHotel );
00099 void set_permisoConstruccion ( bool permisoConstruccion );
00100 void set_precioCasa ( int precioCasa );
00101 void set_precioHotel ( int precioHotel );
00102 void set_numCasas ( int numCasas );
00103 void set_numHoteles ( int numHoteles );
00104 void set_banca ( banca *b );
00105
00106
00107
00108
00109
00110
00114 string ver_monopolio();
00115
00129 string mostrar();
00130
00136 string dibujarCasillaHorizontal ( int fila, int anchoCasilla );
00137
00138
00144 string dibujarCasillaVertical ( int fila, int anchoCasilla );
00145
00154 string dibujarCasillaEnTablero ();
00155
00160 string leyendaCasilla ( int num, int nombreCorto, int tipo, int nombre, int estado );
00161
00167 long calcularAlquiler ( jugador* j );
00168
00175 int adjudicarA ( propietario* j );
00176
00181 string infoString ();
00182
00190 int hipotecar ();
00191
00196 int deshipotecar ();
00197
00202 bool esOfertable ();
00203
00208 void liberar ( propietario *p );
00209
00213 string guardar();
00214
00215
00216
00223 bool esConstruible ();
00224
00229 bool puedeVenderEdificio ();
00230
00235 int construir ();
00236
00240 int construirSinComprobar ();
00241
00247 int vender ();
00248
00252 int venderSinComprobar ();
00253
00254 };
00255
00256 inline long calle::get_alquilerBase () const
00257 {
00258 return _alquilerBase;
00259 }
00260
00261 inline long calle::get_alquilerUnaCasa () const
00262 {
00263 return _alquilerUnaCasa;
00264 }
00265
00266 inline long calle::get_alquilerDosCasas () const
00267 {
00268 return _alquilerDosCasas;
00269 }
00270
00271 inline long calle::get_alquilerTresCasas () const
00272 {
00273 return _alquilerTresCasas;
00274 }
00275
00276 inline long calle::get_alquilerCuatroCasas () const
00277 {
00278 return _alquilerCuatroCasas;
00279 }
00280
00281 inline long calle::get_alquilerHotel () const
00282 {
00283 return _alquilerHotel;
00284 }
00285
00286 inline bool calle::get_permisoConstruccion () const
00287 {
00288 return _permisoConstruccion;
00289 }
00290
00291 inline int calle::get_precioCasa () const
00292 {
00293 return _precioCasa;
00294 }
00295
00296 inline int calle::get_precioVentaCasa () const
00297 {
00298 return _precioCasa / 2;
00299 }
00300
00301 inline int calle::get_precioHotel () const
00302 {
00303 return _precioHotel;
00304 }
00305
00306 inline int calle::get_precioVentaHotel () const
00307 {
00308 return _precioHotel / 2;
00309 }
00310
00311 inline int calle::get_numCasas () const
00312 {
00313 return _numCasas;
00314 }
00315
00316 inline int calle::get_numHoteles () const
00317 {
00318 return _numHoteles;
00319 }
00320
00321 inline banca *calle::get_banca () const
00322 {
00323 return _banca;
00324 }
00325
00326
00327
00328 inline void calle::set_alquilerBase ( long alquilerBase )
00329 {
00330 _alquilerBase = alquilerBase;
00331 }
00332
00333 inline void calle::set_alquilerUnaCasa ( long alquilerUnaCasa )
00334 {
00335 _alquilerUnaCasa = alquilerUnaCasa;
00336 }
00337
00338 inline void calle::set_alquilerDosCasas ( long alquilerDosCasas )
00339 {
00340 _alquilerDosCasas = alquilerDosCasas;
00341 }
00342
00343 inline void calle::set_alquilerTresCasas ( long alquilerTresCasas )
00344 {
00345 _alquilerTresCasas = alquilerTresCasas;
00346 }
00347
00348 inline void calle::set_alquilerCuatroCasas ( long alquilerCuatroCasas )
00349 {
00350 _alquilerCuatroCasas = alquilerCuatroCasas;
00351 }
00352
00353 inline void calle::set_alquilerHotel ( long alquilerHotel )
00354 {
00355 _alquilerHotel = alquilerHotel;
00356 }
00357
00358 inline void calle::set_permisoConstruccion ( bool permisoConstruccion )
00359 {
00360 _permisoConstruccion = permisoConstruccion;
00361 }
00362
00363 inline void calle::set_precioCasa ( int precioCasa )
00364 {
00365 _precioCasa = precioCasa;
00366 }
00367
00368 inline void calle::set_precioHotel ( int precioHotel )
00369 {
00370 _precioHotel = precioHotel;
00371 }
00372
00373 inline void calle::set_numCasas ( int numCasas )
00374 {
00375 _numCasas = numCasas;
00376 }
00377
00378 inline void calle::set_numHoteles ( int numHoteles )
00379 {
00380 _numHoteles = numHoteles;
00381 }
00382
00383 inline void calle::set_banca ( banca *b )
00384 {
00385 _banca = b;
00386 }
00387
00388 #endif