Skip to content

Commit

Permalink
chore: some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Musat committed Dec 11, 2022
1 parent 40e4954 commit c8d3b0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/render/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ func (c *Connector) Render(matrix *graphics.Matrix) error {
collides, err := matrix.RayCastVertical(
cur,
map[string]func(string) bool{
// if an arrow or a block is already present, then that is a hit.
cellType: func(value string) bool {
return utils.InArray(value, []string{block, arrow})
},
// if there is a line, belonging to another connector which claimed ownership, then hit.
noCrossOwnership: func(value string) bool {
return value != c.from.Id
},
Expand Down

0 comments on commit c8d3b0b

Please sign in to comment.