Skip to content

Commit

Permalink
refactor: move graphics to board
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Musat committed Dec 12, 2022
1 parent b64e606 commit de998ac
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/board/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package board
import (
"fmt"

"dep-tree/internal/graphics"
"dep-tree/internal/board/graphics"
"dep-tree/internal/utils"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/board/board.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/elliotchance/orderedmap/v2"

"dep-tree/internal/graphics"
"dep-tree/internal/board/graphics"
)

type Board struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/board/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package board
import (
"fmt"

"dep-tree/internal/graphics"
graphics2 "dep-tree/internal/board/graphics"
"dep-tree/internal/utils"
)

Expand All @@ -17,7 +17,7 @@ type Connector struct {
}

//nolint:gocyclo
func (c *Connector) Render(matrix *graphics.Matrix) error { // TODO: factor this function out.
func (c *Connector) Render(matrix *graphics2.Matrix) error { // TODO: factor this function out.
reverseX := c.to.Position.X < c.from.Position.X
reverseY := c.to.Position.Y < c.from.Position.Y

Expand All @@ -30,7 +30,7 @@ func (c *Connector) Render(matrix *graphics.Matrix) error { // TODO: factor this
}

// 2. start with just one vertical step.
tracer := graphics.NewLineTracer(from)
tracer := graphics2.NewLineTracer(from)
var cur utils.Vector
if reverseY {
cur = tracer.MoveHorizontal(false)
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.

0 comments on commit de998ac

Please sign in to comment.