-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathGameMap.java
More file actions
106 lines (98 loc) · 9.29 KB
/
GameMap.java
File metadata and controls
106 lines (98 loc) · 9.29 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// 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;
@SuppressWarnings("unused")
public final class GameMap extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_24_3_25(); }
public static GameMap getRootAsGameMap(ByteBuffer _bb) { return getRootAsGameMap(_bb, new GameMap()); }
public static GameMap getRootAsGameMap(ByteBuffer _bb, GameMap obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public GameMap __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; }
public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); }
public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); }
public battlecode.schema.Vec size() { return size(new battlecode.schema.Vec()); }
public battlecode.schema.Vec size(battlecode.schema.Vec obj) { int o = __offset(6); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; }
public int symmetry() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
public battlecode.schema.InitialBodyTable initialBodies() { return initialBodies(new battlecode.schema.InitialBodyTable()); }
public battlecode.schema.InitialBodyTable initialBodies(battlecode.schema.InitialBodyTable obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
public int randomSeed() { int o = __offset(12); return o != 0 ? bb.getInt(o + bb_pos) : 0; }
public boolean walls(int j) { int o = __offset(14); return o != 0 ? 0!=bb.get(__vector(o) + j * 1) : false; }
public int wallsLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; }
public BooleanVector wallsVector() { return wallsVector(new BooleanVector()); }
public BooleanVector wallsVector(BooleanVector obj) { int o = __offset(14); return o != 0 ? obj.__assign(__vector(o), bb) : null; }
public ByteBuffer wallsAsByteBuffer() { return __vector_as_bytebuffer(14, 1); }
public ByteBuffer wallsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 1); }
public boolean dirt(int j) { int o = __offset(16); return o != 0 ? 0!=bb.get(__vector(o) + j * 1) : false; }
public int dirtLength() { int o = __offset(16); return o != 0 ? __vector_len(o) : 0; }
public BooleanVector dirtVector() { return dirtVector(new BooleanVector()); }
public BooleanVector dirtVector(BooleanVector obj) { int o = __offset(16); return o != 0 ? obj.__assign(__vector(o), bb) : null; }
public ByteBuffer dirtAsByteBuffer() { return __vector_as_bytebuffer(16, 1); }
public ByteBuffer dirtInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 16, 1); }
public byte cheese(int j) { int o = __offset(18); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; }
public int cheeseLength() { int o = __offset(18); return o != 0 ? __vector_len(o) : 0; }
public ByteVector cheeseVector() { return cheeseVector(new ByteVector()); }
public ByteVector cheeseVector(ByteVector obj) { int o = __offset(18); return o != 0 ? obj.__assign(__vector(o), bb) : null; }
public ByteBuffer cheeseAsByteBuffer() { return __vector_as_bytebuffer(18, 1); }
public ByteBuffer cheeseInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 18, 1); }
public battlecode.schema.VecTable cheeseMines() { return cheeseMines(new battlecode.schema.VecTable()); }
public battlecode.schema.VecTable cheeseMines(battlecode.schema.VecTable obj) { int o = __offset(20); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; }
public int catWaypointIds(int j) { int o = __offset(22); return o != 0 ? bb.getShort(__vector(o) + j * 2) & 0xFFFF : 0; }
public int catWaypointIdsLength() { int o = __offset(22); return o != 0 ? __vector_len(o) : 0; }
public ShortVector catWaypointIdsVector() { return catWaypointIdsVector(new ShortVector()); }
public ShortVector catWaypointIdsVector(ShortVector obj) { int o = __offset(22); return o != 0 ? obj.__assign(__vector(o), bb) : null; }
public ByteBuffer catWaypointIdsAsByteBuffer() { return __vector_as_bytebuffer(22, 2); }
public ByteBuffer catWaypointIdsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 22, 2); }
public battlecode.schema.VecTable catWaypointVecs(int j) { return catWaypointVecs(new battlecode.schema.VecTable(), j); }
public battlecode.schema.VecTable catWaypointVecs(battlecode.schema.VecTable obj, int j) { int o = __offset(24); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; }
public int catWaypointVecsLength() { int o = __offset(24); return o != 0 ? __vector_len(o) : 0; }
public battlecode.schema.VecTable.Vector catWaypointVecsVector() { return catWaypointVecsVector(new battlecode.schema.VecTable.Vector()); }
public battlecode.schema.VecTable.Vector catWaypointVecsVector(battlecode.schema.VecTable.Vector obj) { int o = __offset(24); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
public static void startGameMap(FlatBufferBuilder builder) { builder.startTable(11); }
public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); }
public static void addSize(FlatBufferBuilder builder, int sizeOffset) { builder.addStruct(1, sizeOffset, 0); }
public static void addSymmetry(FlatBufferBuilder builder, int symmetry) { builder.addInt(2, symmetry, 0); }
public static void addInitialBodies(FlatBufferBuilder builder, int initialBodiesOffset) { builder.addOffset(3, initialBodiesOffset, 0); }
public static void addRandomSeed(FlatBufferBuilder builder, int randomSeed) { builder.addInt(4, randomSeed, 0); }
public static void addWalls(FlatBufferBuilder builder, int wallsOffset) { builder.addOffset(5, wallsOffset, 0); }
public static int createWallsVector(FlatBufferBuilder builder, boolean[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addBoolean(data[i]); return builder.endVector(); }
public static void startWallsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
public static void addDirt(FlatBufferBuilder builder, int dirtOffset) { builder.addOffset(6, dirtOffset, 0); }
public static int createDirtVector(FlatBufferBuilder builder, boolean[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addBoolean(data[i]); return builder.endVector(); }
public static void startDirtVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
public static void addCheese(FlatBufferBuilder builder, int cheeseOffset) { builder.addOffset(7, cheeseOffset, 0); }
public static int createCheeseVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); }
public static int createCheeseVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); }
public static void startCheeseVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); }
public static void addCheeseMines(FlatBufferBuilder builder, int cheeseMinesOffset) { builder.addOffset(8, cheeseMinesOffset, 0); }
public static void addCatWaypointIds(FlatBufferBuilder builder, int catWaypointIdsOffset) { builder.addOffset(9, catWaypointIdsOffset, 0); }
public static int createCatWaypointIdsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(2, data.length, 2); for (int i = data.length - 1; i >= 0; i--) builder.addShort((short) data[i]); return builder.endVector(); }
public static void startCatWaypointIdsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(2, numElems, 2); }
public static void addCatWaypointVecs(FlatBufferBuilder builder, int catWaypointVecsOffset) { builder.addOffset(10, catWaypointVecsOffset, 0); }
public static int createCatWaypointVecsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); }
public static void startCatWaypointVecsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static int endGameMap(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}
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 GameMap get(int j) { return get(new GameMap(), j); }
public GameMap get(GameMap obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
}