Skip to content

Commit

Permalink
Pretty
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehjohn committed Mar 14, 2024
1 parent 52187f8 commit 4b5f3d5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Sudoku.Console/TreeGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,25 @@ private static string ProcessNode(Node node)
var box = y / 3 * 3 + x / 3;

var isGuess = node.Move.Type != MoveType.None && i == node.Move.X + node.Move.Y * 9;

var radius = i switch
{
0 or 6 or 30 or 54 or 60 => " tl",
2 or 8 or 32 or 56 or 62 => " tr",
18 or 24 or 48 or 72 or 78 => " bl",
20 or 26 or 50 or 74 or 80 => " br",
_ => string.Empty
};

if (box % 2 == 0)
{
if (isGuess)
{
puzzle.Append("<td class='guess' style='background-color: #e0e0e0;'>");
puzzle.Append($"<td class='guess{radius}' style='background-color: #e0e0e0;'>");
}
else
{
puzzle.Append("<td style='background-color: #e0e0e0;'>");
puzzle.Append($"<td class='{radius}' style='background-color: #e0e0e0;'>");
}
}
else
Expand Down

0 comments on commit 4b5f3d5

Please sign in to comment.