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

mazo.h

00001 /***********************************************************************************
00002  *  CLASE MAZO
00003  *  Clase que representa un mazo de tarjetas. Un mazo estará compuesto por un número
00004  *  indeterminado de tarjetas. 
00005  *  Los jugadores recogeran una tarjeta del mazo correspondiente.
00006  *
00007  *  Requiere:
00008  *     - librerías de C++ (fstream, string, deque, iostream, ctime, cstdlib)
00009  *     - clase tarjeta
00010  *     - clase mtrand (algoritmo Merssene Twister para generar numeros aleatorios)     
00011  *
00012  *  Autor: Javier Aragón Zabalegui (PFC para la uc3m: street Master's)
00013  *  Contacto: 100039831@alumnos.uc3m.es
00014  *  version 1.0
00015  **********************************************************************************/
00016 
00017 #ifndef __MAZO__
00018 #define __MAZO__
00019 
00020 #include "cadenas.h"
00021 #include "configuracion.h"
00022 #include "tarjeta.h"
00023 
00024 #include "mtrand.h"
00025 
00026 #include <fstream>
00027 #include <string>
00028 #include <deque>
00029 #include <iostream>
00030 #include <ctime>
00031 #include <cstdlib>
00032 using namespace std;
00033 
00034 class mazo{
00035 
00036  private:
00037   //Atributos
00038   string _nombre;
00039   
00040   //Asociaciones
00041   deque <tarjeta*> _contiene;  //Tarjetas que forman el mazo
00042  public:
00043 
00044   // Constructor por defecto
00045   mazo ();
00046   
00047   // Constructor explícito
00048   mazo ( string nombre );
00049   
00050   // Copy constructor
00051   mazo (const mazo& right);
00052 
00053   // Operador de asignación
00054   mazo& operator= (const mazo& right);
00055 
00056   // Destructor
00057   ~mazo ();
00058   
00059   // Métodos GET
00060   string get_nombre () const;
00061   
00062   // Métodos SET
00063   void set_nombre ( string nombre );
00064   
00065   // Otros métodos
00066   
00070   int cargar_tarjetas ( string ficheroTarjetas, string tipo );
00071   
00076   int anyadirTarjeta ( string nombre, int numero, string tipo );
00077   
00082   int anyadirAccion ( int numero, int pay, int advance, int advanceto, int payeach, 
00083                       int payhouse, int payhotel, int multiPago, bool nextutil, bool tojail,
00084                       bool nextrr, bool jailcard, bool cobrarSalida, int multiPagoDado, 
00085                       bool nextPropiedad );
00086 
00090   bool existeTarjeta ( int numero );
00091 
00096   int cogerTarjeta ( jugador *j );
00097 
00102   int devolverTarjeta ( jugador *j );
00103 
00107   tarjeta *obtenerTarjeta ( int numero );
00108 
00112   int eliminarTarjeta ( int numero );
00113 
00114 };
00115 
00116 inline string mazo::get_nombre () const
00117 {
00118   return _nombre;
00119 }
00120 
00121 inline void mazo::set_nombre ( string nombre )
00122 {
00123   _nombre = nombre;
00124 }
00125 
00126 #endif

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