Examples of Peao


Examples of scotlandyard.client.util.Peao

   */

  public void criarPeoes (String[] nomes){
    System.out.println("\tCriando peoes...");
    for (int i = 0; i < nomes.length; i++) {
      peoes[i] = new Peao(nomes[i], i);
      peoes[i].setUrl("images/"+peoes[i].getID()+".gif");
      System.out.println("\t\tPeao "+i+" ID: "+peoes[i].getID());
    }
    numeroDeJogadores = nomes.length;
    System.out.print("\tOk.\n");
View Full Code Here

Examples of scotlandyard.client.util.Peao

    //x = quadrados[src].retirarJogador(IDJogador);
   
    //Verifica se h� algum peao no quadrado de origem
    //Se sim, desenha
    //Se n�o desenha campo
    Peao p = getPeaoAt (src);
    System.out.println("\t\t\t\tSRC: "+src+" ");
    if (p == null){
      //System.out.println("nulo");
      quadrados[src].setUrl(CAMPO_URL);
    }else{
     
      quadrados[src].setUrl(p.getUrl());
    }
    //quadrados[src].setUrl("images/" + x + ".png");
    //Desenha peao no destino
    System.out.println("\t\t\t\tDEST: "+dest+"\n");
    quadrados[dest].setUrl(peoes[indexOf(nome)].getUrl());
View Full Code Here

Examples of scotlandyard.client.util.Peao

  private boolean highlighted;
 
  public void criarPeoes (String[] nomes){
    System.out.println("\tCriando peoes...");
    for (int i = 0; i < nomes.length; i++) {
      peoes[i] = new Peao(nomes[i], i);
      peoes[i].setUrl("images/"+peoes[i].getID()+".gif");
      System.out.println("\t\tPeao "+i+" ID: "+peoes[i].getID());
      //if (peoes[i].getNomeJogador().equals(myGame.getMyName()))
      //  meuPeao = peoes[i];
    }
View Full Code Here

Examples of scotlandyard.client.util.Peao

  public void mover(String nome, int src, int dest) {
    System.out.println("\n\t\t\tMOVENDO "+nome);
    peoes[indexOf(nome)].setCurrentSquare(dest);
   
    //Verifica se h� pe�o no quadrado src
    Peao p = getPeaoAt (src);
    System.out.println("\t\t\t\tSRC: "+src+" ");
    if (p == null){
      quadrados[src].setUrl(CAMPO_URL);
    }else{
     
      quadrados[src].setUrl(p.getUrl());
    }
    System.out.println("\t\t\t\tDEST: "+dest+"\n");
    quadrados[dest].setUrl(peoes[indexOf(nome)].getUrl());
    //Foca no quadrado onde est� posicionada o jogador
    //Isso pode ser melhorado posteriormente, j� que
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.