aoc21/main.go

62 lines
2.1 KiB
Go
Raw Normal View History

2022-02-07 21:59:19 +02:00
package main
import (
"fmt"
2022-02-08 20:32:54 +02:00
"log"
2022-02-07 21:59:19 +02:00
"os"
"strings"
"github.com/fotonmoton/aoc2021/client"
"github.com/fotonmoton/aoc2021/d1"
2022-02-22 21:56:49 +02:00
"github.com/fotonmoton/aoc2021/d10"
2022-04-03 22:38:47 +03:00
"github.com/fotonmoton/aoc2021/d11"
2022-05-04 18:03:29 +03:00
"github.com/fotonmoton/aoc2021/d12"
2022-05-05 19:39:59 +03:00
"github.com/fotonmoton/aoc2021/d13"
2022-02-07 22:00:52 +02:00
"github.com/fotonmoton/aoc2021/d2"
2022-02-08 21:38:18 +02:00
"github.com/fotonmoton/aoc2021/d3"
2022-02-13 20:14:28 +02:00
"github.com/fotonmoton/aoc2021/d4"
2022-02-15 01:00:39 +02:00
"github.com/fotonmoton/aoc2021/d5"
2022-02-17 01:25:23 +02:00
"github.com/fotonmoton/aoc2021/d6"
2022-02-17 22:38:34 +02:00
"github.com/fotonmoton/aoc2021/d7"
2022-02-19 17:23:06 +02:00
"github.com/fotonmoton/aoc2021/d8"
2022-02-21 22:01:00 +02:00
"github.com/fotonmoton/aoc2021/d9"
2022-02-07 21:59:19 +02:00
)
func main() {
2022-02-08 20:32:54 +02:00
session, err := os.ReadFile("session")
2022-02-07 21:59:19 +02:00
2022-02-08 20:32:54 +02:00
if err != nil {
log.Fatal(err)
}
client := client.NewClient(strings.TrimSpace(string(session)))
2022-02-21 22:28:30 +02:00
fmt.Printf("day 1: %v\n", d1.P1(client.Day(1)))
fmt.Printf("day 1 part 2: %v\n", d1.P2(client.Day(1)))
fmt.Printf("day 2: %v\n", d2.P1(client.Day(2)))
fmt.Printf("day 2 part 2: %v\n", d2.P2(client.Day(2)))
fmt.Printf("day 3: %v\n", d3.P1(client.Day(3)))
fmt.Printf("day 3 part 2: %v\n", d3.P2(client.Day(3)))
fmt.Printf("day 4: %v\n", d4.P1(client.Day(4)))
fmt.Printf("day 4 part 2: %v\n", d4.P2(client.Day(4)))
fmt.Printf("day 5: %v\n", d5.P1(client.Day(5)))
fmt.Printf("day 5 part 2: %v\n", d5.P2(client.Day(5)))
fmt.Printf("day 6: %v\n", d6.P1(client.Day(6), 80))
fmt.Printf("day 6 part 2: %v\n", d6.P2(client.Day(6), 256))
fmt.Printf("day 7: %v\n", d7.P1(client.Day(7)))
fmt.Printf("day 7 part 2: %v\n", d7.P2(client.Day(7)))
fmt.Printf("day 8: %v\n", d8.P1(client.Day(8)))
fmt.Printf("day 8 part 2: %v\n", d8.P2(client.Day(8)))
fmt.Printf("day 9: %v\n", d9.P1(client.Day(9)))
fmt.Printf("day 9 part 2: %v\n", d9.P2(client.Day(9)))
2022-02-22 21:56:49 +02:00
fmt.Printf("day 10: %v\n", d10.P1(client.Day(10)))
fmt.Printf("day 10 part 2: %v\n", d10.P2(client.Day(10)))
2022-04-03 22:38:47 +03:00
fmt.Printf("day 11: %v\n", d11.P1(client.Day(11)))
fmt.Printf("day 11 part 2: %v\n", d11.P2(client.Day(11)))
2022-05-04 18:03:29 +03:00
fmt.Printf("day 12: %v\n", d12.P1(client.Day(12)))
fmt.Printf("day 12 part 2: %v\n", d12.P2(client.Day(12)))
2022-05-05 19:39:59 +03:00
fmt.Printf("day 13: %v\n", d13.P1(client.Day(13)))
fmt.Printf("day 13 part 2: %v\n", d13.P2(client.Day(13)))
2022-02-07 21:59:19 +02:00
}