コード例 #1
0
 private Point3 getRandomCell(final FightMap fightMap) {
   Point3 cell = null;
   for (int i = 0; i < 3; ++i) {
     cell = this.getRandomCellInEffectArea(fightMap);
     if (cell != null) {
       cell.setZ(fightMap.getCellHeight(cell.getX(), cell.getY()));
       final int path = this.getPathToCellValidity(fightMap, cell);
       if (path == -1) {
         cell = null;
       } else {
         if (this.cellAlreadyContainsCasterDeposit(cell)) {
           cell = null;
         }
         if (cell != null) {
           return cell;
         }
       }
     }
   }
   return cell;
 }