public void AddPiece(int color, string location) { var intX = RookPiece.ConvertLetterInt(location); var intY = Convert.ToInt32(location.Substring(1, 1)); if (intX == RookPosition.X || intY == RookPosition.Y) { Board[intX, intY] = color + 1; } }
private string GetColFormat(int xPos, int yPos, bool capture) { var chReturn = ""; var charCap = capture ? "x" : "-"; var EndPos = RookPiece.getCharValue(xPos) + yPos.ToString(); chReturn = $"R{RookPosition.OrigId}{charCap}{EndPos}"; return(chReturn); }
public RookMovement(string position) { RookPosition = new RookPiece(position); }