private static void PrintBasicCLI() { Console.Clear(); Chalk.BlueLine("\t\t\tSudoku Multi Solver"); Chalk.White("\n"); Sudoku.PrettyPrint(); }
public void PrettyPrint() { //Local function to print either a point or the value string printCell(int i, int j) { if (Board[i, j] == 0) { return("·"); } return(Board[i, j].ToString()); } for (var i = 0; i < Board.GetLength(0); i++) { if (i % 3 == 0) { Chalk.BlueLine("\t\t+---------+---------+---------+"); } Chalk.Blue("\t\t|"); for (var j = 0; j < Board.GetLength(1); j += 3) { Chalk.White($" {printCell(i, j)} "); Chalk.White($" {printCell(i, j+1)} "); Chalk.White($" {printCell(i, j+2)} "); Chalk.Blue("|"); } Chalk.WhiteLine(""); } Chalk.BlueLine("\t\t+---------+---------+---------+"); }
public static void Run() { try { Chalk.BlueLine("Welcome to the Sudoku Solver CLI. Type 'help' or '?' to display available commands."); //Todo remove this SetSolver(new BasicBacktrackSolver()); LifeCycle(); } catch (Exception e) { Chalk.RedLine(e.Message); } }
public void Execute() { Chalk.BlueLine(toEcho); }