public void Highlight(Tile center, int lower, int upper, Predicate <Tile> Match, Tile.HighlightColor color, bool isAdditive = true, int skipUnmatchedAfter = int.MaxValue) { foreach (Tile tile in BreadthFirstSearch(center, lower, upper, Match, skipUnmatchedAfter)) { Highlight(tile, color, isAdditive); } }
/// <summary> /// High light tiles filtered by a certain mask within a certain interval of distance to a central tile with a given color /// </summary> /// <param name="center"> The central tile to concern </param> /// <param name="lower"> The lower boundary of the distance </param> /// <param name="upper"> The higher boundary of the distance </param> /// <param name="mask"> The mask for filtering </param> /// <param name="color"> The color to highlight with </param> /// <param name="skipUnmatched"> [optional] </param> public void Highlight(Tile center, int lower, int upper, Predicate <Tile> Match, Tile.HighlightColor color, bool isAdditive = true, bool skipUnmatched = false) { Highlight(center, lower, upper, Match, color, isAdditive, skipUnmatched ? 0 : int.MaxValue); }
public void Highlight(Tile center, int range, Predicate <Tile> Match, Tile.HighlightColor color, bool isAdditive = true, int skipUnmatchedAfter = int.MaxValue) { Highlight(center, 0, range, Match, color, isAdditive, skipUnmatchedAfter); }
/// <summary> /// High light tiles filtered by a certain mask within a certain range of a central tile with a given color /// </summary> /// <param name="center"> The central tile to concern </param> /// <param name="range"> The range to concern </param> /// <param name="mask"> The mask for filtering </param> /// <param name="color"> The color to highlight with </param> /// <param name="skipUnmatched"> [optional] </param> public void Highlight(Tile center, int range, Predicate <Tile> Match, Tile.HighlightColor color, bool isAdditive = true, bool skipUnmatched = false) { Highlight(center, 0, range, Match, color, isAdditive, skipUnmatched); }
public void Highlight(Tile center, int range, Tile.HighlightColor color, bool isAdditive = true, int skipUnmatchedAfter = int.MaxValue) { Highlight(center, 0, range, tile => true, color, isAdditive, skipUnmatchedAfter); }
/// <summary> /// High light tiles within a certain range of a central tile with a given color /// </summary> /// <param name="center"> The central tile to concern </param> /// <param name="range"> The range to concern </param> /// <param name="color"> The color to highlight with </param> /// <param name="skipUnmatched"> [optional] </param> public void Highlight(Tile center, int range, Tile.HighlightColor color, bool isAdditive = true, bool skipUnmatched = false) { Highlight(center, 0, range, tile => true, color, isAdditive, skipUnmatched); }
//public void wipeTiles() //{ // if (numHighlightedTiles > 0) // { // numHighlightedTiles = 0; // foreach (Tile tile in grid) // { // //reset all tiles // tile.Wipe(); // } // } //} public void Highlight(Tile tile, Tile.HighlightColor color, bool isAdditive = true) { tile.Highlight(color, isAdditive); numHighlightedTiles++; }