// Path: manual-bwapi/TilePosition.java
// public class TilePosition extends AbstractPoint<TilePosition>{
//     private int x, y;
// 
//     public TilePosition(int x, int y) {
//         this.x = x;
//         this.y = y;
//     }
// 
//     public String toString() {
//         return "[" + x + ", " + y + "]";
//     }
// 
//     public native boolean hasPath(TilePosition position);
// 
//     public native boolean isValid();
// 
//     public native TilePosition makeValid();
// 
//     public native double getDistance(TilePosition position);
// 
//     public native double getLength();
// 
//     public int getX() {
//         return x;
//     }
// 
//     public int getY() {
//         return y;
//     }
// 
//     public static TilePosition Invalid;
// 
//     public static TilePosition None;
// 
//     public static TilePosition Unknown;
// 
//     private static Map<Long, TilePosition> instances = new HashMap<Long, TilePosition>();
// 
//     private TilePosition(long pointer) {
//         this.pointer = pointer;
//     }
// 
//     private static TilePosition get(long pointer) {
//         TilePosition instance = instances.get(pointer);
//         if (instance == null) {
//             instance = new TilePosition(pointer);
//             instances.put(pointer, instance);
//         }
//         return instance;
//     }
// 
//     private long pointer;
// 
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (!(o instanceof TilePosition)) return false;
// 
//         TilePosition that = (TilePosition) o;
// 
//         if (x != that.x) return false;
//         if (y != that.y) return false;
// 
//         return true;
//     }
// 
//     @Override
//     public int hashCode() {
//         int result = x;
//         result = 31 * result + y;
//         return result;
//     }
// 
//     public TilePosition getPoint(){
//         return this;
//     }
// }


import bwapi.TilePosition;
import java.lang.Override;
import java.util.HashMap;
import java.util.Map;
    @Override
    public int hashCode() {
        int result = x;
        result = 31 * result + y;
        return result;
    }


    private static Map<Long, Position> instances = new HashMap<Long, Position>();

    private Position(long pointer) {
        this.pointer = pointer;
    }

    private static Position get(long pointer) {
        Position instance = instances.get(pointer);
        if (instance == null) {
            instance = new Position(pointer);
            instances.put(pointer, instance);
        }
        return instance;
    }

    private long pointer;

    public Position getPoint(){
        return this;
    }

    public TilePosition toTilePosition(){
// Path: manual-bwapi/TilePosition.java
// public class TilePosition extends AbstractPoint<TilePosition>{
//     private int x, y;
// 
//     public TilePosition(int x, int y) {
//         this.x = x;
//         this.y = y;
//     }
// 
//     public String toString() {
//         return "[" + x + ", " + y + "]";
//     }
// 
//     public native boolean hasPath(TilePosition position);
// 
//     public native boolean isValid();
// 
//     public native TilePosition makeValid();
// 
//     public native double getDistance(TilePosition position);
// 
//     public native double getLength();
// 
//     public int getX() {
//         return x;
//     }
// 
//     public int getY() {
//         return y;
//     }
// 
//     public static TilePosition Invalid;
// 
//     public static TilePosition None;
// 
//     public static TilePosition Unknown;
// 
//     private static Map<Long, TilePosition> instances = new HashMap<Long, TilePosition>();
// 
//     private TilePosition(long pointer) {
//         this.pointer = pointer;
//     }
// 
//     private static TilePosition get(long pointer) {
//         TilePosition instance = instances.get(pointer);
//         if (instance == null) {
//             instance = new TilePosition(pointer);
//             instances.put(pointer, instance);
//         }
//         return instance;
//     }
// 
//     private long pointer;
// 
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (!(o instanceof TilePosition)) return false;
// 
//         TilePosition that = (TilePosition) o;
// 
//         if (x != that.x) return false;
//         if (y != that.y) return false;
// 
//         return true;
//     }
// 
//     @Override
//     public int hashCode() {
//         int result = x;
//         result = 31 * result + y;
//         return result;
//     }
// 
//     public TilePosition getPoint(){
//         return this;
//     }
// }


// Path: manual-bwapi4/Position.java
import bwapi.TilePosition;
import java.lang.Override;
import java.util.HashMap;
import java.util.Map;

    @Override
    public int hashCode() {
        int result = x;
        result = 31 * result + y;
        return result;
    }


    private static Map<Long, Position> instances = new HashMap<Long, Position>();

    private Position(long pointer) {
        this.pointer = pointer;
    }

    private static Position get(long pointer) {
        Position instance = instances.get(pointer);
        if (instance == null) {
            instance = new Position(pointer);
            instances.put(pointer, instance);
        }
        return instance;
    }

    private long pointer;

    public Position getPoint(){
        return this;
    }

    public TilePosition toTilePosition(){
        return new TilePosition(x / TilePosition.SIZE_IN_PIXELS, y / TilePosition.SIZE_IN_PIXELS);