public string RenderBoard() { string[] allowedValues = new string[] { xGlyph, oGlyph }; var transformed = Squares.Select(s => allowedValues.Contains(s?.ToUpper()) ? s.ToUpper() : spacer); return(string.Format(Board, transformed.ToArray())); }
public override string ToString() { return(string.Join("", Squares.Select(e => e.Value == 0 ? "#" : e.Value.ToString()))); }
public void ClearGrid() { Squares = Squares.Select(x => new MinesweeperSquare(x.xPos, x.yPos, x.SquaresIndex)).ToList(); }
public bool CanBeFoundAtCoordinate(GridCoordinate coordinate) { return(Squares == null ? false : Squares.Select(gs => gs.Coordinate).Contains(coordinate)); }
public override string ToString() { //useful for debugging return(String.Concat(Squares.Select(s => s.Position.ToString() + ((s.Team == Team.None) ? " " : s.Team.ToString()).Surround("|")))); }