This commit is contained in:
2022-12-15 14:56:28 +01:00
parent 108980344b
commit cc58326f8c
20 changed files with 145 additions and 145 deletions

View File

@@ -9,18 +9,18 @@ import (
func main() {
rockStructures := common.Parse(*bufio.NewScanner(os.Stdin))
tileMap := common.NewMap()
tileMap := common.NewMap()
for _, rockStructure := range rockStructures {
tileMap.AddRockStructure(rockStructure)
}
tileMap.AddFloor()
for _, rockStructure := range rockStructures {
tileMap.AddRockStructure(rockStructure)
}
tileMap.AddFloor()
units := 0
for !tileMap.IsSourceBlocked() {
tileMap.DropSand()
units++
}
units := 0
for !tileMap.IsSourceBlocked() {
tileMap.DropSand()
units++
}
fmt.Println(units)
fmt.Println(units)
}