-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
33 lines (27 loc) · 777 Bytes
/
main.go
File metadata and controls
33 lines (27 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"lem-in/ants"
dataparser "lem-in/data-parser"
"lem-in/farm"
"lem-in/paths"
"lem-in/structs"
"lem-in/utils"
"log"
"os"
)
func main() {
if len(os.Args) != 2 {
log.Fatal("Missing file name")
os.Exit(1)
}
data := dataparser.LoadData(os.Args[1])
generationData := dataparser.ReadData(data)
farm.GenerateFarm(generationData)
var allPaths [][]*structs.Room
paths.FindAllPossiblePaths(make([]*structs.Room, 0), structs.FARM[structs.STARTROOMID], 0, &allPaths, &structs.FARM[structs.STARTROOMID])
utils.SortPaths(&allPaths)
allCombinations := paths.FindCombinations(allPaths)
bestCombination := paths.FindBestComb(allCombinations)
antsList := ants.SpawnAnts(bestCombination)
ants.MakeStep(antsList)
}