00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __TARJETA__
00018 #define __TARJETA__
00019
00020
00021 #include "accion.h"
00022 #include "cadenas.h"
00023
00024 #include <string>
00025 #include <vector>
00026 #include <iostream>
00027 using namespace std;
00028
00029
00030 class tarjeta {
00031
00032 private:
00033
00034
00035 int _numero;
00036 string _texto;
00037 bool _disponible;
00038 string _tipoMazo;
00039
00040
00041 vector <accion> _accion;
00042
00043 public:
00044
00045
00046 tarjeta ();
00047
00048
00049 tarjeta ( int numero, string texto, bool disponible, string tipoMazo );
00050
00051
00052 tarjeta ( const tarjeta& right );
00053
00054
00055 tarjeta& operator= (const tarjeta& right);
00056
00057 friend ostream& operator<< ( ostream& os, tarjeta *tjt );
00058
00059
00060 ~tarjeta ();
00061
00062
00063 int get_numero () const;
00064 string get_texto () const;
00065 bool get_disponible () const;
00066 string get_tipoMazo () const;
00067
00068
00069 void set_numero ( int numero );
00070 void set_texto ( string texto );
00071 void set_disponible ( bool disponible );
00072 void set_tipoMazo ( string tipoMazo );
00073
00074
00075
00079 void incluirAccion ( int pay, int advance, int advanceto, int payeach,
00080 int payhouse, int payhotel, int multiPago, bool nextutil, bool tojail,
00081 bool nextrr, bool jailcard, bool cobrarSalida, int multiPagoDado,
00082 bool nextPropiedad );
00083
00087 int get_numeroOpciones ();
00088
00092 int ejecutar ( jugador* player );
00093
00098 int buscarAccionCarcel ();
00099
00104 int buscarCobrar ();
00105 };
00106
00107 inline int tarjeta::get_numero () const
00108 {
00109 return _numero;
00110 }
00111
00112 inline string tarjeta::get_texto () const
00113 {
00114 return _texto;
00115 }
00116
00117 inline bool tarjeta::get_disponible () const
00118 {
00119 return _numero;
00120 }
00121
00122 inline string tarjeta::get_tipoMazo () const
00123 {
00124 return _tipoMazo;
00125 }
00126
00127 inline void tarjeta::set_numero ( int numero )
00128 {
00129 _numero = numero;
00130 }
00131
00132 inline void tarjeta::set_texto( string texto )
00133 {
00134 _texto = texto;
00135 }
00136
00137 inline void tarjeta::set_disponible ( bool disponible )
00138 {
00139 _disponible = disponible;
00140 }
00141
00142 inline void tarjeta::set_tipoMazo ( string tipoMazo )
00143 {
00144 _tipoMazo = tipoMazo;
00145 }
00146
00147 #endif