Class Map
public class Map
extends java.lang.Object
Maps are simply a list of a bunch of different zones. In order to create a new map, you can create a class that extends this one, and, in the constructor of your extension, put a call to super with a new DynamicArray of zones representing the field's physical layout.
Maps themselves aren't all that difficult to figure out how to use - the real issue is zones and shapes. For your convenience, both fo those are linked right here.
Zone/map/field wrapping is not yet done - we need to work on that before we can hope to do anything important with this library.
- Since:
- 0.1.0
- Author:
- Colin Robertson
-
Field Summary
Fields Modifier and Type Field Description static me.wobblyyyy.edt.DynamicArray<java.lang.String>
FIELD_NAMES
A list of all of the possible names for field zones.me.wobblyyyy.edt.DynamicArray<Zone>
zones
All of the zones contained within the map. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description private static boolean
isField(Zone zone)
Check whether or not a given zone is technically field.private me.wobblyyyy.edt.DynamicArray<Zone>
wrap(me.wobblyyyy.edt.DynamicArray<Zone> zones)
Wrap an entire field with four zones, to prevent the pathfinder from finding paths that are out-of-bounds.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
FIELD_NAMES
public static final me.wobblyyyy.edt.DynamicArray<java.lang.String> FIELD_NAMESA list of all of the possible names for field zones.Please, for the sake of everyone's sanity - name every single zone that's a field "field". Every potential problem is thus averted - wonderful, right?!
-
zones
All of the zones contained within the map.
-
-
Constructor Details
-
Map
public Map()Create a new map without any elements.You should not EVER use this constructor in a non-testing environment! Because zones is final, you'll be entirely screwed over if you construct a new map like this.
-
Map
Create a new map with a single zone.- Parameters:
zone
- the zone to add.
-
Map
Create a new map with several zones.- Parameters:
zones
- the zones to add to the map.
-
Map
Create a new map with a list of zones.- Parameters:
zones
- the zones to add to the map.
-
-
Method Details
-
isField
Check whether or not a given zone is technically field.- Parameters:
zone
- the zone to check.- Returns:
- whether or not that zone is classified as a field zone.
-
wrap
Wrap an entire field with four zones, to prevent the pathfinder from finding paths that are out-of-bounds.- Parameters:
zones
- the original zones.- Returns:
- a list of wrapped zones.
-