Fix checker alignment when bearing off

This commit is contained in:
Trevor Slocum 2023-09-24 22:50:55 -07:00
parent b722181bb5
commit 9a2cbab9d3
2 changed files with 9 additions and 0 deletions

5
CHANGELOG Normal file
View file

@ -0,0 +1,5 @@
1.0.1:
- Fix checker alignment when bearing off.
1.0.0:
- Initial release

View file

@ -791,6 +791,10 @@ func (b *board) setSpaceRects() {
h = int((float64(b.h) - (b.verticalBorderSize * 2)) / 2)
if space == bgammon.SpaceHomePlayer || space == bgammon.SpaceHomeOpponent {
x = -int(b.spaceWidth * 2)
}
b.spaceRects[space] = [4]int{x, y, w, h}
}