Package de.axxeed.animosy.model

Examples of de.axxeed.animosy.model.Fugitive


  public void fill() {
    if (rows.size()>0) rows.clear();
   
    Game g = Manager.getGame();
    Detective[] det = g.getBoard().getDetectives();
    Fugitive mrX = g.getBoard().getMrX();
    for(int i=0;i<=g.getCurrentMove();i++) {
      HistoryTableRow htr = new HistoryTableRow(i);
      htr.setNumberOfDetectives(det.length);
      if(g.isCheckPoint(i) || Manager.getOptions().isCheat()) {
        if(i<mrX.getPrevPos().length) {
          htr.setMrXMove(mrX.getPrevPos()[i]);
        }
      }
      else {
        htr.setMrXMove(null);
      }
View Full Code Here


      g2d.drawImage(mapImageStatic,0,0,null);

        g2d.setStroke(new BasicStroke(3f));
        Game game = Manager.getGame();
       
        Fugitive fugitive = game.getBoard().getMrX();
//        // if(fugitive!=null && showMrX) {
        if(fugitive!=null && ( Manager.getOptions().isCheat() || game.isCheckPoint() ) && game.getState() != Game.NO_GAME) {
          if(fugitive.getPrevPos().length>game.getCurrentMove()) {
              int pp = fugitive.getPosition().getPosition();
              g2d.setColor(new Color(255,255,255));
              g2d.fillRect(pos[pp].x, pos[pp].y-12, 30, 13);
              g2d.setColor(Color.BLACK);
              g2d.drawOval(pos[pp].x, pos[pp].y, 30, 30);
              g2d.drawString("X-"+pp, pos[pp].x, pos[pp].y);
View Full Code Here

        detectives=new Detective[nrOfDetectives];
      for(int i=0;i<nrOfDetectives;i++)
      {
          detectives[i]=new Detective(board.getDetectives()[i].getPosition());
      }
        MrX=new Fugitive(board.getMrX().getPosition());
        int noOfNodes = BoardModel.nodesCount();
        if(shortestDistance == null) {
            shortestDistance=new int[noOfNodes][noOfNodes];
            for(int i=0;i<noOfNodes;i++)
                for(int j=0;j<noOfNodes;j++)
View Full Code Here

      log.warn("No position node found for detective "+i);
    }
    detectives[i]=new Detective(n);
      }
        Node n=board.MrX.getPosition();
        MrX=new Fugitive(n);
    }
View Full Code Here

     *@return the score for this board
     */
    private static int scoreBoard(VirtualBoard board)
    {
  Detective []detectives=board.detectives;
  Fugitive mrx=board.MrX;
  int totalDistance=0;
  int totalMobility=0;
  for(int count=0;count<Manager.getOptions().getNumberOfDetectives();count++)
      {
    totalDistance+=shortestDistance[detectives[count].getPosition().getPosition()][mrx.getPosition().getPosition()];
    totalMobility+=detectives[count].mobility();
      }
  int score=3*totalDistance-totalMobility/5;
  return score;
    }
View Full Code Here

TOP

Related Classes of de.axxeed.animosy.model.Fugitive

Copyright © 2018 www.massapicom. 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.