This commit is contained in:
2022-12-14 15:33:49 +01:00
parent c40dee10cc
commit 53da8720bd
4 changed files with 195 additions and 2 deletions

24
day14/ex1/main.go Normal file
View File

@@ -0,0 +1,24 @@
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)
}