| 630 | } |
| 631 | |
| 632 | private int[] generateCircles() |
| 633 | { |
| 634 | int numCircles = (int)(random.nextGaussian()*Constants.NUM_CIRCLES_STANDARD_DEVIATION+Constants.NUM_CIRCLES_MEAN_VALUE); |
| 635 | |
| 636 | if(numCircles < 1) |
| 637 | { |
| 638 | numCircles = 1; |
| 639 | } |
| 640 | |
| 641 | int circles[] = new int[3*numCircles]; |
| 642 | |
| 643 | for(int i=0; i<numCircles; i++) |
| 644 | { |
| 645 | circles[3*i] = random.nextInt(Constants.PLANE_LENGTH); |
| 646 | circles[3*i+1] = random.nextInt(Constants.PLANE_HEIGHT); |
| 647 | circles[3*i+2] = (int)(random.nextGaussian()*Constants.CIRCLE_STANDARD_DEVIATION+Constants.CIRCLE_MEAN_RADIUS); |
| 648 | |
| 649 | while(circles[3*i+2] < 0) |
| 650 | { |
| 651 | circles[3*i+2] = (int)(random.nextGaussian()*Constants.CIRCLE_STANDARD_DEVIATION+Constants.CIRCLE_MEAN_RADIUS); |
| 652 | } |
| 653 | |
| 654 | } |
| 655 | |
| 656 | return circles; |
| 657 | } |
| 658 | |
| 659 | private class Soldier |
| 660 | { |