Página principal | Lista de namespace | Lista de archivos

jugador_reglas.h

00001 /***********************************************************************************
00002  *  CLASE JUGADOR_REGLAS
00003  *  Clase que incluye las reglas de los agentes de IA basados en reglas. Se distiguen
00004  *  distintos tipos de reglas según el valor del atributo _reglas
00005  *
00006  *  Requiere:
00007  *     - clase jugador (herencia)
00008  *     - clase cadenas
00009  *     - clase mtrand
00010  *
00011  *  Autor: Javier Aragón Zabalegui (PFC para la uc3m: street Master's)
00012  *  Contacto: 100039831@alumnos.uc3m.es
00013  *  version 1.0
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   //Atributos
00031   int _reglas; //Define que tipo de reglas usa 
00032 
00033  public:
00034 
00035   // Constructor por defecto
00036   jugador_reglas ();
00037   
00038   // Constructor explícito
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   // Copy constructor
00044   jugador_reglas (const jugador_reglas& right);
00045 
00046   // Operador de asignación
00047   jugador_reglas& operator= (const jugador_reglas& right);
00048 
00049   // Destructor
00050   ~jugador_reglas ();
00051 
00052   // Métodos GET
00053   int get_reglas () const;   
00054   
00055   // Métodos SET
00056   void set_reglas ( int reglas );
00057 
00058   //Otros métodos
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

Generado el Fri Jun 30 12:38:29 2006 para Street Master's por  doxygen 1.3.9.1