clean up board util methods

This commit is contained in:
stryan 2021-10-07 13:21:46 -04:00
parent dc117077af
commit 3a38ef2252
1 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,11 @@ func (b *Board) GetRow(id int) []*Card {
}
func (b *Board) GetCard(id int, pos int) *Card {
return b.GetRow(id)[pos]
if pos >= 0 && pos <= 3 {
return b.GetRow(id)[pos]
} else {
return nil
}
}
func (b *Board) Remove(c *Card) {