clean up board util methods
This commit is contained in:
parent
dc117077af
commit
3a38ef2252
4
board.go
4
board.go
@ -26,7 +26,11 @@ func (b *Board) GetRow(id int) []*Card {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (b *Board) GetCard(id int, pos int) *Card {
|
func (b *Board) GetCard(id int, pos int) *Card {
|
||||||
|
if pos >= 0 && pos <= 3 {
|
||||||
return b.GetRow(id)[pos]
|
return b.GetRow(id)[pos]
|
||||||
|
} else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (b *Board) Remove(c *Card) {
|
func (b *Board) Remove(c *Card) {
|
||||||
|
Loading…
Reference in New Issue
Block a user