File tree Expand file tree Collapse file tree 5 files changed +5
-8
lines changed
Expand file tree Collapse file tree 5 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 11package bwapi ;
22import java .nio .ByteBuffer ;
3- class ClientData {
3+ final class ClientData {
44 private WrappedBuffer buffer ;
55 private GameData gameData ;
66 ClientData () {
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ class FrameBuffer {
2222 private int stepBot = 0 ;
2323 private ArrayList <ByteBuffer > dataBuffer = new ArrayList <>();
2424
25- // Synchronization locks
2625 private final Lock lockWrite = new ReentrantLock ();
2726 final Lock lockSize = new ReentrantLock ();
2827 final Condition conditionSize = lockSize .newCondition ();
Original file line number Diff line number Diff line change @@ -1019,7 +1019,7 @@ public Order getOrder() {
10191019
10201020 /**
10211021 * Retrieves the secondary Order that the unit is assigned. Secondary
1022- * orders are step in the background as a sub-order. An example would be {@link Order#TrainFighter},
1022+ * orders are run in the background as a sub-order. An example would be {@link Order#TrainFighter},
10231023 * because a @Carrier can move and train fighters at the same time.
10241024 *
10251025 * @return The secondary {@link Order} that the unit is executing.
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ public static void main(String[] args) throws IOException {
9191 try (PrintWriter out = new PrintWriter (sw )) {
9292 out .println ("package bwapi;" );
9393 out .println ("import java.nio.ByteBuffer;" );
94- out .println ("class ClientData {" );
94+ out .println ("final class ClientData {" );
9595 out .println (" private WrappedBuffer buffer;" );
9696 out .println (" private GameData gameData;" );
9797 out .println (" ClientData() {" );
Original file line number Diff line number Diff line change @@ -19,9 +19,8 @@ public static class EmptyState {
1919
2020 @ Setup (Level .Invocation )
2121 public void setup () {
22- client = new Client (ByteBuffer .allocateDirect (ClientData .GameData .SIZE ));
2322 game = new Game ();
24- game .clientData ().setBuffer (client . mapFile ( ));
23+ game .clientData ().setBuffer (ByteBuffer . allocateDirect ( ClientData . GameData . SIZE ));
2524 strings = buildStrings ();
2625 }
2726
@@ -35,10 +34,9 @@ public static class FilledWithStrings {
3534
3635 @ Setup (Level .Invocation )
3736 public void setup () {
38- client = new Client (ByteBuffer .allocateDirect (ClientData .GameData .SIZE ));
3937 data = client .clientData ().gameData ();
4038 game = new Game ();
41- game .clientData ().setBuffer (client . mapFile ( ));
39+ game .clientData ().setBuffer (ByteBuffer . allocateDirect ( ClientData . GameData . SIZE ));
4240 String [] strings = buildStrings ();
4341 for (String s : strings ) {
4442 GameDataUtils .addString (client .clientData ().gameData (), s );
You can’t perform that action at this time.
0 commit comments