mirror of
https://github.com/Assasinnys/ED-AStar-Galaxy-Router
synced 2025-04-13 23:07:19 +03:00
init: initial commit
This commit is contained in:
parent
ef739464b8
commit
c769ef6b61
@ -180,7 +180,7 @@ fun calcTime(timeStart: Long): Double = System.currentTimeMillis().minus(timeSta
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
//TODO alternative MAIN with work in file
|
//TODO alternative MAIN with work in file
|
||||||
/*fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
println("Start A Star with file table")
|
println("Start A Star with file table")
|
||||||
|
|
||||||
val time = System.currentTimeMillis()
|
val time = System.currentTimeMillis()
|
||||||
@ -190,10 +190,10 @@ fun calcTime(timeStart: Long): Double = System.currentTimeMillis().minus(timeSta
|
|||||||
aStar.activateAStarAlgorithm()
|
aStar.activateAStarAlgorithm()
|
||||||
|
|
||||||
println("Complete with time: ${calcTime(time)}")
|
println("Complete with time: ${calcTime(time)}")
|
||||||
}*/
|
}
|
||||||
|
|
||||||
//TODO MAIN METHOD
|
//TODO MAIN METHOD
|
||||||
fun main(args: Array<String>) {
|
/*fun main(args: Array<String>) {
|
||||||
println("Start!")
|
println("Start!")
|
||||||
val timeStartProgram = System.currentTimeMillis()
|
val timeStartProgram = System.currentTimeMillis()
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ fun main(args: Array<String>) {
|
|||||||
algorithm.activateAStarAlgorithm()
|
algorithm.activateAStarAlgorithm()
|
||||||
|
|
||||||
println("Work complete. Time spent ${calcTime(timeStartProgram)}")
|
println("Work complete. Time spent ${calcTime(timeStartProgram)}")
|
||||||
}
|
}*/
|
||||||
|
|
||||||
// systems
|
// systems
|
||||||
const val SOL = "Sol"
|
const val SOL = "Sol"
|
||||||
|
@ -18,6 +18,7 @@ import java.sql.ResultSet
|
|||||||
//TODO check neighbors StarPoint's for better way (lower cost) [ready 50%]
|
//TODO check neighbors StarPoint's for better way (lower cost) [ready 50%]
|
||||||
|
|
||||||
class AStarMain(private val startSystem: String, private val finishSystem: String) {
|
class AStarMain(private val startSystem: String, private val finishSystem: String) {
|
||||||
|
/*
|
||||||
private val database = Database()
|
private val database = Database()
|
||||||
private val finishStarPoint: StarPoint = createFinishStarPoint()
|
private val finishStarPoint: StarPoint = createFinishStarPoint()
|
||||||
private val startStarPoint: StarPoint = createStartStarPoint()
|
private val startStarPoint: StarPoint = createStartStarPoint()
|
||||||
@ -33,7 +34,9 @@ class AStarMain(private val startSystem: String, private val finishSystem: Strin
|
|||||||
// println("finishStarPoint=${finishStarPoint.systemId64}")
|
// println("finishStarPoint=${finishStarPoint.systemId64}")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun activateAStarAlgorithm()/*: Pair<Int, Int>*/ {
|
fun activateAStarAlgorithm()*/
|
||||||
|
/*: Pair<Int, Int>*//*
|
||||||
|
{
|
||||||
|
|
||||||
findNeighbours(startStarPoint)
|
findNeighbours(startStarPoint)
|
||||||
|
|
||||||
@ -230,6 +233,7 @@ class AStarMain(private val startSystem: String, private val finishSystem: Strin
|
|||||||
val id64: Long,
|
val id64: Long,
|
||||||
val coords: Coordinates
|
val coords: Coordinates
|
||||||
)
|
)
|
||||||
|
*/
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val CORRIDOR = "coridor3"
|
const val CORRIDOR = "coridor3"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user