-
Notifications
You must be signed in to change notification settings - Fork 0
City Class
Vitor Bruno de Oliveira Barth edited this page Nov 2, 2018
·
4 revisions
To get an instance city1
of City
you should:
import { City } from './city.js'
let city1 = new City({id: 1, x: 123, y: 456});
The ID of the city.
The position of the city in the x axis.
The position of the city in the y axis.
Returns the straight distance from city
to otherCity
.
Verify if two cities are the same. Unfortunaly, this method doesn't override the ==
operator.