-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Red/Green to the colors for day 15
- Loading branch information
1 parent
87dfc0c
commit a28abb1
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Advent.UseCases.Day15; | ||
|
||
public static class Day15Helper | ||
{ | ||
public static string TableMarkup(string value) | ||
{ | ||
// find the @ character and then surround it with | ||
// [bold green]@[/] and preserve the rest of the string | ||
return value | ||
.Replace("[]", "[bold green][[]][/]") | ||
.Replace("O", "[bold green]O[/]") | ||
.Replace("#", "[bold red]#[/]") | ||
.Replace("@", "[bold yellow]@[/]"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters