File tree Expand file tree Collapse file tree
engine/src/main/battlecode/world Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55## Note, Competitors
66This is the development repo! You most likely won't need anything in here; do not clone this.
7- Instead, follow the instructions [ here] ( https://play.battlecode.org/bc26java /quick_start ) to get started.
7+ Instead, follow the instructions [ here] ( https://play.battlecode.org/bc26 /quick_start ) to get started.
88
99## Repository Structure
1010
Original file line number Diff line number Diff line change @@ -887,11 +887,11 @@ public boolean setWinnerIfMorePoints() {
887887
888888 for (Team team : List .of (Team .A , Team .B )) {
889889
890- float proportion_rat_kings = total_num_rat_kings != 0 ? teamInfo .getNumRatKings (team ) / total_num_rat_kings : 0 ;
891- float proportion_cheese_transferred = total_amount_cheese_transferred != 0 ? teamInfo .getCheeseTransferred (team ) / total_amount_cheese_transferred : 0 ;
892- float proportion_cat_damage = total_amount_cat_damage != 0 ? teamInfo .getDamageToCats (team ) / total_amount_cat_damage : 0 ;
890+ float proportion_rat_kings = total_num_rat_kings != 0 ? ( float ) teamInfo .getNumRatKings (team ) / total_num_rat_kings : 0.0f ;
891+ float proportion_cheese_transferred = total_amount_cheese_transferred != 0 ? ( float ) teamInfo .getCheeseTransferred (team ) / total_amount_cheese_transferred : 0.0f ;
892+ float proportion_cat_damage = total_amount_cat_damage != 0 ? ( float ) teamInfo .getDamageToCats (team ) / total_amount_cat_damage : 0.0f ;
893893
894- int points = (int ) (cat_weight * 100 * ( proportion_cat_damage ) + king_weight * 100 * proportion_rat_kings
894+ int points = (int ) (cat_weight * 100 * proportion_cat_damage + king_weight * 100 * proportion_rat_kings
895895 + cheese_transfer_weight * 100 * proportion_cheese_transferred );
896896 this .teamInfo .addPoints (team , points );
897897 teamPoints .add (points );
Original file line number Diff line number Diff line change @@ -1148,7 +1148,9 @@ public void becomeRatKing() throws GameActionException {
11481148 this .gameWorld .getTeamInfo ().addCheese (this .getTeam (), -GameConstants .RAT_KING_UPGRADE_CHEESE_COST );
11491149 health = Math .min (health , UnitType .RAT_KING .health );
11501150
1151- robot .becomeRatKing (health );
1151+ this .gameWorld .getTeamInfo ().addCheese (this .getTeam (), robot .getCheese ());
1152+ this .robot .addCheese (-this .robot .getCheese ());
1153+ this .robot .becomeRatKing (health );
11521154
11531155
11541156 for (Direction d : Direction .allDirections ()) {
You can’t perform that action at this time.
0 commit comments