-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathPlaceTrap.java
More file actions
49 lines (41 loc) · 1.77 KB
/
PlaceTrap.java
File metadata and controls
49 lines (41 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// automatically generated by the FlatBuffers compiler, do not modify
package battlecode.schema;
import com.google.flatbuffers.BaseVector;
import com.google.flatbuffers.BooleanVector;
import com.google.flatbuffers.ByteVector;
import com.google.flatbuffers.Constants;
import com.google.flatbuffers.DoubleVector;
import com.google.flatbuffers.FlatBufferBuilder;
import com.google.flatbuffers.FloatVector;
import com.google.flatbuffers.IntVector;
import com.google.flatbuffers.LongVector;
import com.google.flatbuffers.ShortVector;
import com.google.flatbuffers.StringVector;
import com.google.flatbuffers.Struct;
import com.google.flatbuffers.Table;
import com.google.flatbuffers.UnionVector;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
/**
* Place a trap at location
*/
@SuppressWarnings("unused")
public final class PlaceTrap extends Struct {
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public PlaceTrap __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public int loc() { return bb.getShort(bb_pos + 0) & 0xFFFF; }
public byte team() { return bb.get(bb_pos + 2); }
public boolean isRatTrapType() { return 0!=bb.get(bb_pos + 3); }
public static int createPlaceTrap(FlatBufferBuilder builder, int loc, byte team, boolean isRatTrapType) {
builder.prep(2, 4);
builder.putBoolean(isRatTrapType);
builder.putByte(team);
builder.putShort((short) loc);
return builder.offset();
}
public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }
public PlaceTrap get(int j) { return get(new PlaceTrap(), j); }
public PlaceTrap get(PlaceTrap obj, int j) { return obj.__assign(__element(j), bb); }
}
}