File tree Expand file tree Collapse file tree 2 files changed +4
-377
lines changed
engine/src/main/battlecode/world
example-bots/src/crossplay_python/lectureplayer_py Expand file tree Collapse file tree 2 files changed +4
-377
lines changed Original file line number Diff line number Diff line change @@ -507,16 +507,16 @@ public void spawnCheese(CheeseMine mine) {
507507 boolean spawn = rand .nextFloat () < mine .generationProbability (currentRound );
508508
509509 if (spawn ) {
510- int dx = rand .nextInt (-GameConstants .SQ_CHEESE_SPAWN_RADIUS , GameConstants .SQ_CHEESE_SPAWN_RADIUS );
511- int dy = rand .nextInt (-GameConstants .SQ_CHEESE_SPAWN_RADIUS , GameConstants .SQ_CHEESE_SPAWN_RADIUS );
510+ int dx = rand .nextInt (-GameConstants .SQ_CHEESE_SPAWN_RADIUS , GameConstants .SQ_CHEESE_SPAWN_RADIUS + 1 );
511+ int dy = rand .nextInt (-GameConstants .SQ_CHEESE_SPAWN_RADIUS , GameConstants .SQ_CHEESE_SPAWN_RADIUS + 1 );
512512
513513 MapLocation ogSpawnLoc = mine .getLocation ();
514514 MapLocation pairedSpawnLoc = mine .getPair ().getLocation ();
515515 CheeseMine pairedMine = mine .getPair ();
516516
517517 for (int invalidSpawns = 0 ; invalidSpawns < 5 ; invalidSpawns ++) {
518- int pair_dx = gameMap .getSymmetry () == MapSymmetry .VERTICAL ? dx : -dx ;
519- int pair_dy = gameMap .getSymmetry () == MapSymmetry .HORIZONTAL ? dy : -dy ;
518+ int pair_dx = gameMap .getSymmetry () == MapSymmetry .HORIZONTAL ? dx : -dx ;
519+ int pair_dy = gameMap .getSymmetry () == MapSymmetry .VERTICAL ? dy : -dy ;
520520
521521 int cheeseX = mine .getLocation ().x + dx ;
522522 int cheeseY = mine .getLocation ().y + dy ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments