Expose "ToDraft"
This commit is contained in:
parent
e4ab093861
commit
ac1ae4f506
2 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ func (s *I8PSet) ProviderByType(typ I8PType) draft.CardProvider {
|
||||||
if len(s.Cards[typ]) < n {
|
if len(s.Cards[typ]) < n {
|
||||||
n = len(s.Cards[typ])
|
n = len(s.Cards[typ])
|
||||||
}
|
}
|
||||||
out, s.Cards[typ] = toDraft(s.Cards[typ][:n]), s.Cards[typ][n:]
|
out, s.Cards[typ] = ToDraft(s.Cards[typ][:n]), s.Cards[typ][n:]
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package mlp
|
||||||
import "git.fromouter.space/mcg/draft"
|
import "git.fromouter.space/mcg/draft"
|
||||||
|
|
||||||
// Converts multiple mlp.Card to draft.Card
|
// Converts multiple mlp.Card to draft.Card
|
||||||
func toDraft(cards []Card) []draft.Card {
|
func ToDraft(cards []Card) []draft.Card {
|
||||||
out := make([]draft.Card, len(cards))
|
out := make([]draft.Card, len(cards))
|
||||||
for i, card := range cards {
|
for i, card := range cards {
|
||||||
out[i] = card.ToDraftCard()
|
out[i] = card.ToDraftCard()
|
||||||
|
|
Loading…
Reference in a new issue