Beispiel #1
0
 public static void window_jump()
 {
     while (true)
     {
         ConsoleB.SetWindowSize(105, 32);
         ConsoleB.SetBufferSize(105, 32);
         Thread.Sleep(150);
         ConsoleB.SetWindowSize(110, 35);
         ConsoleB.SetBufferSize(110, 35);
         Thread.Sleep(100);
     }
 }
 public async Task WindowTransition()
 {
     await Task.Run(() =>
     {
         for (int i = 4; i < 160; i += 4)
         {
             Console.SetWindowSize(i, i / 4);
             Thread.Sleep(2);
         }
         Console.SetBufferSize(160, 39);
     });
 }
Beispiel #3
0
    public static void draw()
    {
        // set the console size
        ConsoleB.SetWindowSize(110, 35);
        ConsoleB.SetBufferSize(110, 35);
        // Clear the screen
        ConsoleB.BackgroundColor = _back;
        ConsoleB.Clear();
        //Console.Clear();
        //Console.BackgroundColor = ConsoleColor.DarkCyan;
        //ConsoleB.BackgroundColor = Color.DarkCyan;
        //ConsoleB.Clear();
        ConsoleB.CursorVisible = false;


        // draw outline
        //origRow = 0;
        //origCol = 0;

        //Console.BackgroundColor = ConsoleColor.White; // if this line is above console.clear() the whole background will be white

        // use for loop to decrease the byte of the program
        for (int i = 0; i < 31; ++i)
        {
            WriteAt("  ", 0, i, back: Color.White, fore: Color.White);
            WriteAt("  ", 108, i, back: Color.White, fore: Color.White);
            WriteAt(" ", 2, i, back: _back, fore: _back);
            WriteAt(" ", 107, i, back: _back, fore: _back);
            Thread.Sleep(15);
        }
        for (int i = 0; i < 110; ++i)
        {
            WriteAt(" ", i, 0, back: Color.White, fore: Color.White);
            WriteAt(" ", i, 30, back: Color.White, fore: Color.White);
            Thread.Sleep(15);
        }

        ConsoleB.BackgroundColor = _back;
        ConsoleB.ForegroundColor = Color.White;
        WriteAt("craft by @ sher", 94, 34, back: _back, fore: Color.White);
    }
Beispiel #4
0
        static void Main()
        {
            Console.OutputEncoding = System.Text.Encoding.UTF8;
            Console.SetWindowSize(70, 45);
            Console.SetBufferSize(70, 45);
            Sudoku.DrawGrid();

            var s = new Sudoku(Sudoku.Medium);

            bool complete;

            do
            {
                if (!s.SetPossible())
                {
                    Console.WriteLine("I dunno!");
                    break;
                }

                complete = s.FindSingles();
                s.Show();
                //Console.ReadLine();
            } while (!complete);
        }