Skip to content

Commit

Permalink
code reorganization
Browse files Browse the repository at this point in the history
  • Loading branch information
Magiczne committed Nov 11, 2024
1 parent 5869e27 commit 793264c
Show file tree
Hide file tree
Showing 87 changed files with 48 additions and 26 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion d01/main.go → 2015/d01/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"aoc2015/util"
"github.com/Magiczne/AdventOfCode/util"
)

func part1(data string) int {
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion d02/main.go → 2015/d02/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main

import (
"aoc2015/util"
"regexp"

"github.com/Magiczne/AdventOfCode/util"
)

type Present struct {
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion d03/main.go → 2015/d03/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main

import (
"aoc2015/util"
"fmt"

"github.com/Magiczne/AdventOfCode/util"
)

func part1(data string) int {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d04/main.go → 2015/d04/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"aoc2015/util"
"crypto/md5"
"encoding/hex"
"fmt"

"github.com/Magiczne/AdventOfCode/util"
)

func part1(data string) int {
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion d05/main.go → 2015/d05/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"aoc2015/util"
"fmt"
"regexp"
"strings"

"github.com/Magiczne/AdventOfCode/util"
)

func part1(data []string) int {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d06/main.go → 2015/d06/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main

import (
"aoc2015/util"
"regexp"

"github.com/Magiczne/AdventOfCode/util"
)

type Instruction struct {
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion d07/main.go → 2015/d07/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"aoc2015/util"
"fmt"
"regexp"
"strings"

"github.com/Magiczne/AdventOfCode/util"
)

func part1(instructions []string) uint16 {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion d08/main.go → 2015/d08/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"aoc2015/util"
"github.com/Magiczne/AdventOfCode/util"
)

func part1(data []string) int {
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d09/main.go → 2015/d09/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"aoc2015/util"
"regexp"
"slices"

"github.com/Magiczne/AdventOfCode/util"

mapset "github.com/deckarep/golang-set/v2"
"github.com/dominikbraun/graph"
)
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d10/main.go → 2015/d10/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main

import (
"aoc2015/util"
"fmt"

"github.com/Magiczne/AdventOfCode/util"
)

func lookAndSay(data string) string {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d11/main.go → 2015/d11/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"aoc2015/util"
"regexp"
"strings"

"github.com/Magiczne/AdventOfCode/util"
)

var disallowedLettersRegex = regexp.MustCompile(`[iol]`)
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion d12/main.go → 2015/d12/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"aoc2015/util"
"os/exec"
"regexp"
"strings"

"github.com/Magiczne/AdventOfCode/util"
)

func part1(data string) int {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d13/main.go → 2015/d13/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"aoc2015/util"
"maps"
"regexp"
"slices"

"github.com/Magiczne/AdventOfCode/util"
)

func calculateMaxHappiness(data map[string]map[string]int) int {
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d14/main.go → 2015/d14/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"aoc2015/util"
"regexp"
"slices"

"github.com/Magiczne/AdventOfCode/util"
)

type Reindeer struct {
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d15/main.go → 2015/d15/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"aoc2015/util"
"regexp"
"slices"

"github.com/Magiczne/AdventOfCode/util"
)

type Ingredient struct {
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d16/main.go → 2015/d16/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"aoc2015/util"
"maps"
"regexp"
"strings"

"github.com/Magiczne/AdventOfCode/util"
)

type Aunt = map[string]int
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion d17/main.go → 2015/d17/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"aoc2015/util"
"slices"

"github.com/Magiczne/AdventOfCode/util"

comb "github.com/mxschmitt/golang-combinations"
)

Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d18/main.go → 2015/d18/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main

import (
"aoc2015/util"
"strings"

"github.com/Magiczne/AdventOfCode/util"
)

func getEnabledNeighbors(neighbors []string) int {
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d19/main.go → 2015/d19/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"aoc2015/util"
"regexp"
"strings"

"github.com/Magiczne/AdventOfCode/util"

mapset "github.com/deckarep/golang-set/v2"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion d20/main.go → 2015/d20/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"aoc2015/util"
"github.com/Magiczne/AdventOfCode/util"
)

// Brute force is my best friend.
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion d21/main.go → 2015/d21/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"aoc2015/util"
"math"
"strings"

"github.com/Magiczne/AdventOfCode/util"
)

type Entity struct {
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion d22/main.go → 2015/d22/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package main

import (
"aoc2015/util"
"math"
"slices"
"strings"

"github.com/Magiczne/AdventOfCode/util"
)

type Boss struct {
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions d23/main.go → 2015/d23/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package main

import (
d23 "aoc2015/d23/cpu"
"aoc2015/util"
"regexp"

d23 "github.com/Magiczne/AdventOfCode/d23/cpu"

"github.com/Magiczne/AdventOfCode/util"
)

func part1(instructions []d23.Instruction) int {
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion d24/main.go → 2015/d24/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"aoc2015/util"
"sort"

"github.com/Magiczne/AdventOfCode/util"

comb "github.com/mxschmitt/golang-combinations"
)

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion go.mod → 2015/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module aoc2015
module github.com/Magiczne/AdventOfCode

go 1.23.2

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 793264c

Please sign in to comment.