Created
March 8, 2012 11:59
-
-
Save fern4lvarez/2000706 to your computer and use it in GitHub Desktop.
Distribución de géneros del usuario
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void iniciaUsuario(Usuario u){ | |
valorGenero= new Hashtable<Generos, Double>(); | |
double artesano=u.getPorcentajeArtesano(); | |
double guardian=u.getPorcentajeGuardian(); | |
double idealista=u.getPorcentajeIdealista(); | |
double racional=u.getPorcentajeRacional(); | |
Generos[] arrGeneros=Generos.values(); | |
for (int i=0; i<arrGeneros.length; i++){ | |
double resul=artesano*tabla.getValorTabla(arrGeneros[i], Temperamento.Artesano)+ | |
guardian*tabla.getValorTabla(arrGeneros[i], Temperamento.Guardian)+ | |
idealista*tabla.getValorTabla(arrGeneros[i], Temperamento.Idealista)+ | |
racional*tabla.getValorTabla(arrGeneros[i], Temperamento.Racional); | |
valorGenero.put(arrGeneros[i], resul); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment