public static void SetPieceBoardField(BoardField boardField, bool isSham) { boardField.Reset(); boardField.SetBackgroundColor(Colors.Black); boardField.SetTextColor(Colors.LightGray); if (isSham == true) { boardField.SetText("SP"); } else { boardField.SetText("P"); } }
private void SetBoardFields() { BoardFields = new BoardField[BoardRows, BoardColumns]; //fields double pointX = 0d; double pointY = FieldSize * (BoardRows - 1); for (int y = 0; y < BoardRows; y++) { for (int x = 0; x < BoardColumns; x++) { BoardFields[y, x] = new BoardField(canvas, FieldSize, FieldSize, pointX, pointY, Colors.Transparent); pointX += FieldSize; } pointX = 0d; pointY -= FieldSize; if (pointY < 0) { pointY = 0d; } } }
public static void SetAgentBoardField(BoardField boardField, int id, bool isRed, bool hasPiece) { boardField.Reset(); boardField.label.FontSize = boardField.label.Width / 3; if (isRed == true) { boardField.SetBackgroundColor(Colors.Red); } else { boardField.SetBackgroundColor(Colors.Blue); } if (hasPiece == true) { boardField.SetText(id.ToString() + "P"); } else { boardField.SetText(id.ToString()); } boardField.SetTextColor(Colors.Black); }