internal int GetAmountOfCheckersAtPoint(int i) { if (i == CheckerColor.Black.GetBar()) { return(BlackBar.GetAmount()); } else if (i == White.GetBar()) { return(WhiteBar.GetAmount()); } else if (i == White.BearOffPositionID()) { return(WhiteBearOff.GetAmount()); } else if (i == Black.BearOffPositionID()) { return(BlackBearOff.GetAmount()); } else { int value = Points[i].GetAmount(); if (value != 0 && Points[i].GetTopChecker().Color == Black) { return(-value); } return(value); } }
internal void GlowPoints(List <int> list) { for (int i = 1; i < Points.Count; i++) { Points[i].Glow(list.Contains(i)); } WhiteBar.Glow(list.Contains(BackgammonGame.WHITE_BAR_ID)); BlackBar.Glow(list.Contains(BackgammonGame.BLACK_BAR_ID)); WhiteBearOff.Glow(list.Contains(BackgammonGame.WHITE_BEAR_OFF_ID)); BlackBearOff.Glow(list.Contains(BackgammonGame.BLACK_BEAR_OFF_ID)); }
internal bool GameOver() { return(WhiteBearOff.GetAmount() == 15 || BlackBearOff.GetAmount() == 15); }