You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
558 B
22 lines
558 B
12 months ago
|
package technology.zim.data
|
||
|
|
||
|
//Data structure wrapper for more easily readable code
|
||
|
|
||
|
|
||
|
@JvmInline
|
||
|
value class WorldData constructor(val data: ArrayList<ArrayList<TileProperties>>) {
|
||
|
constructor(xmin : Int, ymin : Int) : this(ArrayList<ArrayList<TileProperties>>()) {
|
||
|
with(data) {
|
||
|
this.ensureCapacity(xmin)
|
||
|
this.fill(ArrayList<TileProperties>())
|
||
|
}
|
||
|
|
||
|
for(y in data) {
|
||
|
with(y) {
|
||
|
this.ensureCapacity((ymin))
|
||
|
this.fill(TileProperties())
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|