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 1
1
package bwapi ;
2
2
import java .nio .ByteBuffer ;
3
- class ClientData {
3
+ final class ClientData {
4
4
private WrappedBuffer buffer ;
5
5
private GameData gameData ;
6
6
ClientData () {
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ class FrameBuffer {
22
22
private int stepBot = 0 ;
23
23
private ArrayList <ByteBuffer > dataBuffer = new ArrayList <>();
24
24
25
- // Synchronization locks
26
25
private final Lock lockWrite = new ReentrantLock ();
27
26
final Lock lockSize = new ReentrantLock ();
28
27
final Condition conditionSize = lockSize .newCondition ();
Original file line number Diff line number Diff line change @@ -1019,7 +1019,7 @@ public Order getOrder() {
1019
1019
1020
1020
/**
1021
1021
* 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},
1023
1023
* because a @Carrier can move and train fighters at the same time.
1024
1024
*
1025
1025
* @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 {
91
91
try (PrintWriter out = new PrintWriter (sw )) {
92
92
out .println ("package bwapi;" );
93
93
out .println ("import java.nio.ByteBuffer;" );
94
- out .println ("class ClientData {" );
94
+ out .println ("final class ClientData {" );
95
95
out .println (" private WrappedBuffer buffer;" );
96
96
out .println (" private GameData gameData;" );
97
97
out .println (" ClientData() {" );
Original file line number Diff line number Diff line change @@ -19,9 +19,8 @@ public static class EmptyState {
19
19
20
20
@ Setup (Level .Invocation )
21
21
public void setup () {
22
- client = new Client (ByteBuffer .allocateDirect (ClientData .GameData .SIZE ));
23
22
game = new Game ();
24
- game .clientData ().setBuffer (client . mapFile ( ));
23
+ game .clientData ().setBuffer (ByteBuffer . allocateDirect ( ClientData . GameData . SIZE ));
25
24
strings = buildStrings ();
26
25
}
27
26
@@ -35,10 +34,9 @@ public static class FilledWithStrings {
35
34
36
35
@ Setup (Level .Invocation )
37
36
public void setup () {
38
- client = new Client (ByteBuffer .allocateDirect (ClientData .GameData .SIZE ));
39
37
data = client .clientData ().gameData ();
40
38
game = new Game ();
41
- game .clientData ().setBuffer (client . mapFile ( ));
39
+ game .clientData ().setBuffer (ByteBuffer . allocateDirect ( ClientData . GameData . SIZE ));
42
40
String [] strings = buildStrings ();
43
41
for (String s : strings ) {
44
42
GameDataUtils .addString (client .clientData ().gameData (), s );
You can’t perform that action at this time.
0 commit comments