Tidy some lint errors

This commit is contained in:
Neil Alexander 2020-12-06 20:26:51 +00:00
parent b9f35c5530
commit fb6b828916
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
33 changed files with 125 additions and 656 deletions

View file

@ -2,19 +2,21 @@ package main
type nodeStore map[int]*simNode
func makeStoreSingle() nodeStore {
s := make(nodeStore)
s[0] = newNode(0)
return s
}
func linkNodes(a *simNode, b *simNode) {
la := a.core.NewSimlink()
lb := b.core.NewSimlink()
la.SetDestination(lb)
lb.SetDestination(la)
la.Start()
lb.Start()
if err := la.SetDestination(lb); err != nil {
panic(err)
}
if err := lb.SetDestination(la); err != nil {
panic(err)
}
if err := la.Start(); err != nil {
panic(err)
}
if err := lb.Start(); err != nil {
panic(err)
}
}
func makeStoreSquareGrid(sideLength int) nodeStore {