Expose "ToDraft"
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Hamcha 2019-06-26 12:14:46 +02:00
parent e4ab093861
commit ac1ae4f506
2 changed files with 2 additions and 2 deletions

View file

@ -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
} }
} }

View file

@ -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()