jfreerails.controller
Class CalcNearestCity
java.lang.Object
jfreerails.controller.CalcNearestCity
public class CalcNearestCity
- extends java.lang.Object
Class to find the nearest city and return that name, so that a station can be
named appropriately. Date: 12th April 2003
- Author:
- Scott Bennett
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
x
private final int x
y
private final int y
w
private final ReadOnlyWorld w
CalcNearestCity
public CalcNearestCity(ReadOnlyWorld world,
int x,
int y)
findNearestCity
public java.lang.String findNearestCity()
getDistance
private double getDistance(int cityX,
int cityY)