Files
2022-12-15 14:56:28 +01:00

25 lines
360 B
Go

package main
import (
"aoc2022/day14/common"
"bufio"
"fmt"
"os"
)
func main() {
rockStructures := common.Parse(*bufio.NewScanner(os.Stdin))
tileMap := common.NewMap()
for _, rockStructure := range rockStructures {
tileMap.AddRockStructure(rockStructure)
}
units := 0
for tileMap.DropSand() {
units++
}
fmt.Println(units)
}