00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __JUGADOR_REGLAS__
00017 #define __JUGADOR_REGLAS__
00018
00019 #include "cadenas.h"
00020 #include "jugador.h"
00021
00022 #include "mtrand.h"
00023 #include <ctime>
00024 using namespace std;
00025
00026 class jugador_reglas : public jugador {
00027
00028 private:
00029
00030
00031 int _reglas;
00032
00033 public:
00034
00035
00036 jugador_reglas ();
00037
00038
00039 jugador_reglas ( string nombre, string color, long dinero_total, long capital, int turnosEncarcelados,
00040 int tiradasDobles, long estado, int multiPago, int reglas );
00041
00042
00043
00044 jugador_reglas (const jugador_reglas& right);
00045
00046
00047 jugador_reglas& operator= (const jugador_reglas& right);
00048
00049
00050 ~jugador_reglas ();
00051
00052
00053 int get_reglas () const;
00054
00055
00056 void set_reglas ( int reglas );
00057
00058
00059
00066 string guardarDatosPersonales ();
00067
00077 long pagar ( long cantidad );
00078
00084 bool decidirComprar ( propiedad *p );
00085
00092 bool decidirSalirPagando ( int tpcPropiedadesLibres, long multa );
00093
00099 bool decidirSalirTarjeta ( int tpcPropiedadesLibres );
00100
00106 int decidirAccionTarjeta ( int numAcciones, tarjeta *tjt );
00107
00112 char decidirImpuestoEspecial ( long cantidad, int tpc );
00113
00119 long pujar( propiedad *p, long maxActual, jugador *ganador );
00120
00126 void hipotecarAleatorio ( long cantidad );
00127
00133 vector <propiedad*> alternativasHipoteca ( long cantidad, vector <propiedad*> L, int index );
00134
00139 vector <propiedad*> calculoUtilidadEsperadaHipotecar ( long cantidadNecesaria );
00140
00145 void venderAleatorio ( long cantidad );
00146
00152 vector <calle*> alternativasVender ( long cantidad, vector <calle*> L, int index );
00153
00160 vector <calle*> calculoUtilidadEsperadaVender ( long cantidad );
00161
00165 void razonarDeshipotecas ();
00166
00170 void deshipotecarAleatorio ();
00171
00177 vector <propiedad*> alternativasDeshipotecar ( long cantidad, vector <propiedad*> L, int index );
00178
00183 vector <propiedad*> calculoUtilidadEsperadaDeshipotecar ( long cantidad );
00184
00188 void razonarConstrucciones ();
00189
00194 void construirAleatorio ();
00195
00200 vector <calle*> alternativasConstruir ( long cantidad, vector <calle*> L, int index );
00201
00208 vector <calle*> calculoUtilidadEsperadaConstruir ( long cantidad );
00209
00210 };
00211
00212 inline int jugador_reglas::get_reglas () const
00213 {
00214 return _reglas;
00215 }
00216
00217 inline void jugador_reglas::set_reglas ( int reglas )
00218 {
00219 _reglas = reglas;
00220 }
00221
00222
00223 #endif