exaV / screeps-kotlin-types

Screep's Kotlin type definitions
MIT License
17 stars 18 forks source link

Change GoalWithRange and [Market Order] CreationParams to data classes. #58

Closed magnusesp closed 4 years ago

magnusesp commented 4 years ago

Had to be outside the external object definition.

Example usage:

val goal = GoalWithRange(pos = dst, range = 1)

val opts = options<SearchOptions> {
    maxRooms = maxSearchRooms
    roomCallback = {roomName -> cmStore.getCostMatrix(roomName, CostMatrixType.NAVIGATION)}
    maxOps = 4000
}

val res = PathFinder.search(dest, goal, opts)