Examples of TipusJugadors


Examples of prop.hex.domini.models.enums.TipusJugadors

  public void carregaPartida( String id_partida, String contrasenya_contrincant )
      throws ClassNotFoundException, IOException, InstantiationException, IllegalAccessException
  {
    partida_actual = PartidaHexGstr.getInstancia().carregaElement( id_partida );
    String nom_usuari_contrincant;
    TipusJugadors tipus_jugador_contrincant;
    if ( !partida_actual.getJugadorA().equals( UsuariCtrl.getInstancia().getUsuariPrincipal() ) )
    {
      nom_usuari_contrincant = partida_actual.getJugadorA().getNom();
      tipus_jugador_contrincant = partida_actual.getJugadorA().getTipusJugador();
View Full Code Here

Examples of prop.hex.domini.models.enums.TipusJugadors

   * @return Cert si el jugador és humà. Fals altrament.
   * @see TipusJugadors
   */
  public boolean esTornHuma()
  {
    TipusJugadors tipus_jugador_actual = obteJugadorTornActual().getTipusJugador();

    return ( TipusJugadors.JUGADOR == tipus_jugador_actual || TipusJugadors.CONVIDAT == tipus_jugador_actual );
  }
View Full Code Here

Examples of prop.hex.domini.models.enums.TipusJugadors

   * @throws NullPointerException   Es dona si el fitxer està buit.
   */
  public static void IAVsHuma()
      throws FileNotFoundException, IOException, ClassNotFoundException, NullPointerException
  {
    TipusJugadors tipus_IA = demanaTipusJugadorIA( "Escriu el número del tipus d'intel·ligència contrincant" );
    usuari_a = agafaUsuari( tipus_IA.getNomUsuari(), tipus_IA );
    usuari_b = agafaUsuari( "Huma", TipusJugadors.JUGADOR );

    creaIVisualitzaPartida();
  }
View Full Code Here

Examples of prop.hex.domini.models.enums.TipusJugadors

   * @throws NullPointerException   Es dona si el fitxer està buit.
   */
  public static void HumaVsIA()
      throws FileNotFoundException, IOException, ClassNotFoundException, NullPointerException
  {
    TipusJugadors tipus_IA = demanaTipusJugadorIA( "Escriu el número del tipus d'intel·ligència contrincant" );
    usuari_a = agafaUsuari( "Huma", TipusJugadors.JUGADOR );
    usuari_b = agafaUsuari( tipus_IA.getNomUsuari(), tipus_IA );

    creaIVisualitzaPartida();
  }
View Full Code Here

Examples of prop.hex.domini.models.enums.TipusJugadors

   * @throws ClassNotFoundException Si hi ha un problema de classes quan es carrega l'usuari.
   * @throws NullPointerException   Es dona si el fitxer està buit.
   */
  public static void IAVsIA() throws FileNotFoundException, IOException, ClassNotFoundException, NullPointerException
  {
    TipusJugadors tipus_IA_A = demanaTipusJugadorIA( "Escriu el número del tipus d'intel·ligència principal" );
    TipusJugadors tipus_IA_B = demanaTipusJugadorIA( "Escriu el número del tipus d'intel·ligència contrincant" );
    usuari_a = agafaUsuari( tipus_IA_A.getNomUsuari(), tipus_IA_A );
    usuari_b = agafaUsuari( tipus_IA_B.getNomUsuari(), tipus_IA_B );

    creaIVisualitzaPartida();
  }
View Full Code Here

Examples of prop.hex.domini.models.enums.TipusJugadors

      throws IOException, ClassNotFoundException, IllegalArgumentException
  {
    // Si ha seleccionat jugador màquina, obtinc quin tipus de màquina exactament i la carrego
    if ( combo_tipus_jugador.getSelectedItem() == "Màquina" )
    {
      TipusJugadors tipus_jugador_a_inicialitzar = ( TipusJugadors ) combo_tipus_maquina.getSelectedItem();

      try
      {
        PresentacioCtrl.getInstancia()
            .preInicialitzaUsuariPartida( num_jugador, tipus_jugador_a_inicialitzar, "", "" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.