MCPcopy Create free account
hub / github.com/SolarLune/masterplan / Cards

Method Cards

grid.go:77–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75}
76
77func (selection GridSelection) Cards() []*Card {
78
79 cards := []*Card{}
80 addedMap := map[*Card]bool{}
81
82 for _, cell := range selection.Cells() {
83
84 for _, card := range cell.Cards {
85
86 if _, added := addedMap[card]; !added {
87 cards = append(cards, cell.Cards...)
88 addedMap[card] = true
89 continue
90 }
91
92 }
93
94 }
95
96 return cards
97
98}
99
100var addedMap = map[*Card]bool{}
101var forEachCard = []*Card{}

Callers 2

CardsInCardShapeMethod · 0.80
CardsInAreaMethod · 0.80

Calls 1

CellsMethod · 0.95

Tested by

no test coverage detected