diff --git a/.github/workflows/Lights Out Build.yml b/.github/workflows/Lights Out Build.yml
new file mode 100644
index 00000000..19633bb3
--- /dev/null
+++ b/.github/workflows/Lights Out Build.yml
@@ -0,0 +1,20 @@
+name: Lights Out Build
+on:
+ push:
+ paths:
+ - 'Projects/Lights Out/**'
+ - '!**.md'
+ pull_request:
+ paths:
+ - 'Projects/Lights Out/**'
+ - '!**.md'
+ workflow_dispatch:
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: 8.0.x
+ - run: dotnet build "Projects\Lights Out\Lights Out.csproj" --configuration Release
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 5112fcc3..50c70e36 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -152,6 +152,16 @@
"console": "externalTerminal",
"stopAtEntry": false,
},
+ {
+ "name": "Lights Out",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "Build Lights Out",
+ "program": "${workspaceFolder}/Projects/Lights Out/bin/Debug/Lights Out.dll",
+ "cwd": "${workspaceFolder}/Projects/Lights Out/bin/Debug",
+ "console": "externalTerminal",
+ "stopAtEntry": false,
+ },
{
"name": "Wordle",
"type": "coreclr",
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index deddea10..eba8b91b 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -665,6 +665,19 @@
],
"problemMatcher": "$msCompile",
},
+ {
+ "label": "Build Lights Out",
+ "command": "dotnet",
+ "type": "process",
+ "args":
+ [
+ "build",
+ "${workspaceFolder}/Projects/Lights Out/Lights Out.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary",
+ ],
+ "problemMatcher": "$msCompile",
+ },
{
"label": "Build Solution",
"command": "dotnet",
diff --git a/Projects/Lights Out/Lights Out.csproj b/Projects/Lights Out/Lights Out.csproj
new file mode 100644
index 00000000..17618311
--- /dev/null
+++ b/Projects/Lights Out/Lights Out.csproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net8.0
+ Lights_Out
+ disable
+ enable
+
+
diff --git a/Projects/Lights Out/Program.cs b/Projects/Lights Out/Program.cs
new file mode 100644
index 00000000..b9e875d1
--- /dev/null
+++ b/Projects/Lights Out/Program.cs
@@ -0,0 +1,310 @@
+using System;
+using System.Text;
+
+const int Length = 5;
+const bool O = true;
+const bool X = false;
+
+bool[][][] levels =
+[
+ [ // 1
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [O, X, O, X, O],
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ ],
+ [ // 2
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ [X, X, X, X, X],
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ ],
+ [ // 3
+ [X, O, X, O, X],
+ [O, O, X, O, O],
+ [O, O, X, O, O],
+ [O, O, X, O, O],
+ [X, O, X, O, X],
+ ],
+ [ // 4
+ [X, X, X, X, X],
+ [O, O, X, O, O],
+ [X, X, X, X, X],
+ [O, X, X, X, O],
+ [O, O, X, O, O],
+ ],
+ [ // 5
+ [O, O, O, O, X],
+ [O, O, O, X, O],
+ [O, O, O, X, O],
+ [X, X, X, O, O],
+ [O, O, X, O, O],
+ ],
+ [ // 6
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ [X, O, O, O, X],
+ ],
+ [ // 7
+ [O, O, O, O, X],
+ [O, X, X, X, O],
+ [O, X, X, X, O],
+ [O, X, X, X, O],
+ [O, O, O, O, X],
+ ],
+ [ // 8
+ [X, X, X, X, X],
+ [X, X, O, X, X],
+ [X, O, X, O, X],
+ [O, X, O, X, O],
+ [X, O, X, O, X],
+ ],
+ [ // 9
+ [X, O, X, O, X],
+ [O, O, O, O, O],
+ [X, O, O, O, X],
+ [X, O, X, O, O],
+ [O, O, O, X, X],
+ ],
+ [ // 10
+ [X, O, O, O, X],
+ [X, O, O, O, X],
+ [X, O, O, O, X],
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ ],
+ [ // 11
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ [X, O, O, O, X],
+ ],
+ [ // 12
+ [O, O, O, O, O],
+ [X, O, X, O, X],
+ [O, O, X, O, O],
+ [X, O, O, O, X],
+ [X, O, X, O, X],
+ ],
+ [ // 13
+ [X, X, X, O, X],
+ [X, X, O, X, O],
+ [X, O, X, O, X],
+ [O, X, O, X, X],
+ [X, O, X, X, X],
+ ],
+ [ // 14
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [X, O, X, X, X],
+ [X, O, X, X, X],
+ [X, O, X, X, X],
+ ],
+ [ // 15
+ [X, X, X, X, X],
+ [X, O, X, X, X],
+ [X, X, X, X, X],
+ [X, O, X, X, X],
+ [X, X, X, X, X],
+ ],
+ [ // 16
+ [O, X, X, X, X],
+ [O, X, X, X, X],
+ [O, X, X, X, X],
+ [O, X, X, X, X],
+ [O, O, O, O, O],
+ ],
+ [ // 17
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [X, X, O, X, X],
+ [X, O, O, O, X],
+ [O, O, O, O, O],
+ ],
+ [ // 18
+ [X, X, O, X, X],
+ [X, O, X, O, X],
+ [O, X, O, X, O],
+ [X, O, X, O, X],
+ [X, X, O, X, X],
+ ],
+ [ // 19
+ [O, X, O, X, O],
+ [X, X, X, X, X],
+ [O, X, O, X, O],
+ [X, X, X, X, X],
+ [O, X, O, X, O],
+ ],
+ [ // 20
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [O, X, X, X, O],
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ ],
+ [ // 21
+ [X, O, O, O, O],
+ [X, O, X, X, X],
+ [X, O, O, O, X],
+ [X, O, X, X, X],
+ [X, O, X, X, X],
+ ],
+ [ // 22
+ [X, O, O, O, X],
+ [O, X, X, X, O],
+ [O, X, X, X, O],
+ [O, X, X, X, O],
+ [X, O, O, O, X],
+ ],
+ [ // 23
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [X, X, O, O, O],
+ [X, X, O, O, X],
+ [X, X, O, X, X],
+ ],
+ [ // 24
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [O, X, X, X, O],
+ [O, O, O, O, O],
+ [X, O, X, X, O],
+ ],
+ [ // 25
+ [O, X, X, X, X],
+ [O, O, X, X, X],
+ [O, O, O, X, X],
+ [O, O, O, O, X],
+ [X, O, O, O, O],
+ ],
+];
+
+Console.OutputEncoding = Encoding.UTF8;
+int level = 0;
+bool[][] board =
+[
+ [O, O, O, O, O],
+ [O, O, O, O, O],
+ [O, O, O, O, O],
+ [O, O, O, O, O],
+ [O, O, O, O, O],
+];
+SetBoard();
+(int Left, int Top) cursor = (0, 0);
+while (true)
+{
+ RenderBoard();
+ Console.Write($"""
+
+ Turn off all the lights. Level {level + 1}.
+
+ Controls:
+ - arrow keys: move cursor
+ - enter: flip lights
+ - backspace: reset level
+ - escape: close game
+ """);
+ Console.SetCursorPosition(2 * cursor.Left, cursor.Top);
+ Console.CursorVisible = false;
+ switch (Console.ReadKey(true).Key)
+ {
+ case ConsoleKey.LeftArrow: cursor.Left = cursor.Left <= 0 ? Length - 1 : cursor.Left - 1; break;
+ case ConsoleKey.RightArrow: cursor.Left = cursor.Left >= Length - 1 ? 0 : cursor.Left + 1; break;
+ case ConsoleKey.UpArrow: cursor.Top = cursor.Top <= 0 ? Length - 1 : cursor.Top - 1; break;
+ case ConsoleKey.DownArrow: cursor.Top = cursor.Top >= Length - 1 ? 0 : cursor.Top + 1; break;
+ case ConsoleKey.Backspace: SetBoard(); break;
+ case ConsoleKey.Escape: goto Close;
+ case ConsoleKey.Enter:
+ board[cursor.Top][cursor.Left] = !board[cursor.Top][cursor.Left];
+ if (cursor.Top > 0) board[cursor.Top - 1][cursor.Left] = !board[cursor.Top - 1][cursor.Left];
+ if (cursor.Top < Length - 1) board[cursor.Top + 1][cursor.Left] = !board[cursor.Top + 1][cursor.Left];
+ if (cursor.Left > 0) board[cursor.Top][cursor.Left - 1] = !board[cursor.Top][cursor.Left - 1];
+ if (cursor.Left < Length - 1) board[cursor.Top][cursor.Left + 1] = !board[cursor.Top][cursor.Left + 1];
+ if (LightsOut())
+ {
+ Console.Clear();
+ RenderBoard();
+ Console.Write($"""
+
+ You turned off all the lights!
+ Level {level + 1} complete.
+
+ Controls:
+ - enter: next level
+ - escape: close game
+ """);
+ switch (Console.ReadKey(true).Key)
+ {
+ case ConsoleKey.Escape: goto Close;
+ case ConsoleKey.Enter:
+ level++;
+ SetBoard();
+ Console.Clear();
+ break;
+ }
+ }
+ break;
+ }
+}
+Close:
+Console.Clear();
+Console.WriteLine("Lights Out was closed.");
+Console.CursorVisible = true;
+
+void SetBoard()
+{
+ for (int i = 0; i < Length; i++)
+ {
+ for (int j = 0; j < Length; j++)
+ {
+ board[i][j] = levels[level][i][j];
+ }
+ }
+}
+
+bool LightsOut()
+{
+ for (int i = 0; i < Length; i++)
+ {
+ for (int j = 0; j < Length; j++)
+ {
+ if (board[i][j])
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+void RenderBoard()
+{
+ StringBuilder render = new();
+ for (int i = 0; i < Length; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ for (int k = 0; k < Length; k++)
+ {
+ switch (j)
+ {
+ case 0: render.Append((k, i) == cursor ? "╔═╤═╗" : "╭───╮"); break;
+ case 1:
+ render.Append((k, i) == cursor ? '╟' : '│');
+ render.Append(board[i][k] ? "███" : " ");
+ render.Append((k, i) == cursor ? '╢' : '│');
+ break;
+ case 2: render.Append((k, i) == cursor ? "╚═╧═╝" : "╰───╯"); break;
+ }
+ }
+ render.AppendLine();
+ }
+ }
+ Console.SetCursorPosition(0, 0);
+ Console.Write(render);
+}
diff --git a/Projects/Lights Out/README.md b/Projects/Lights Out/README.md
new file mode 100644
index 00000000..0b31c3ac
--- /dev/null
+++ b/Projects/Lights Out/README.md
@@ -0,0 +1,59 @@
+
+ Lights Out
+
+
+
+
+
+
+
+
+
+
+
+
+ You can play this game in your browser:
+
+
+
+
+
+ Hosted On GitHub Pages
+
+
+Lights Out is a puzzle game in which you try to turn off all the lights. However, when you toggle a light on/off you will also toggle the lights adjacent to it.
+
+```cs
+╭───╮╭───╮╭───╮╭───╮╭───╮
+│ ││ ││ ││ ││ │
+╰───╯╰───╯╰───╯╰───╯╰───╯
+╭───╮╭───╮╭───╮╭───╮╭───╮
+│ ││ ││ ││ ││ │
+╰───╯╰───╯╰───╯╰───╯╰───╯
+╭───╮╭───╮╭───╮╭───╮╭───╮
+│███││ ││███││ ││███│
+╰───╯╰───╯╰───╯╰───╯╰───╯
+╭───╮╔═╤═╗╭───╮╭───╮╭───╮
+│ │╟ ╢│ ││ ││ │
+╰───╯╚═╧═╝╰───╯╰───╯╰───╯
+╭───╮╭───╮╭───╮╭───╮╭───╮
+│ ││ ││ ││ ││ │
+╰───╯╰───╯╰───╯╰───╯╰───╯
+
+Turn off all the lights. Level 1.
+```
+
+## Input
+
+- `↑`, `↓`, `←`, `→`: move cursor
+- `enter`: flip lights & move to next level
+- `backspace`: restart level
+- `escape`: exit game
+
+## Downloads
+
+[win-x64](https://github.com/dotnet/dotnet-console-games/raw/binaries/win-x64/Lights%20Out.exe)
+
+[linux-x64](https://github.com/dotnet/dotnet-console-games/raw/binaries/linux-x64/Lights%20Out)
+
+[osx-x64](https://github.com/dotnet/dotnet-console-games/raw/binaries/osx-x64/Lights%20Out)
diff --git a/Projects/Website/Games/Lights Out/Lights Out.cs b/Projects/Website/Games/Lights Out/Lights Out.cs
new file mode 100644
index 00000000..55d091fa
--- /dev/null
+++ b/Projects/Website/Games/Lights Out/Lights Out.cs
@@ -0,0 +1,321 @@
+using System;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Website.Games.Lights_Out;
+
+public class Lights_Out
+{
+ public readonly BlazorConsole Console = new();
+
+ public async Task Run()
+ {
+ const int Length = 5;
+ const bool O = true;
+ const bool X = false;
+
+ bool[][][] levels =
+ [
+ [ // 1
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [O, X, O, X, O],
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ ],
+ [ // 2
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ [X, X, X, X, X],
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ ],
+ [ // 3
+ [X, O, X, O, X],
+ [O, O, X, O, O],
+ [O, O, X, O, O],
+ [O, O, X, O, O],
+ [X, O, X, O, X],
+ ],
+ [ // 4
+ [X, X, X, X, X],
+ [O, O, X, O, O],
+ [X, X, X, X, X],
+ [O, X, X, X, O],
+ [O, O, X, O, O],
+ ],
+ [ // 5
+ [O, O, O, O, X],
+ [O, O, O, X, O],
+ [O, O, O, X, O],
+ [X, X, X, O, O],
+ [O, O, X, O, O],
+ ],
+ [ // 6
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ [X, O, O, O, X],
+ ],
+ [ // 7
+ [O, O, O, O, X],
+ [O, X, X, X, O],
+ [O, X, X, X, O],
+ [O, X, X, X, O],
+ [O, O, O, O, X],
+ ],
+ [ // 8
+ [X, X, X, X, X],
+ [X, X, O, X, X],
+ [X, O, X, O, X],
+ [O, X, O, X, O],
+ [X, O, X, O, X],
+ ],
+ [ // 9
+ [X, O, X, O, X],
+ [O, O, O, O, O],
+ [X, O, O, O, X],
+ [X, O, X, O, O],
+ [O, O, O, X, X],
+ ],
+ [ // 10
+ [X, O, O, O, X],
+ [X, O, O, O, X],
+ [X, O, O, O, X],
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ ],
+ [ // 11
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ [O, X, O, X, O],
+ [X, O, O, O, X],
+ ],
+ [ // 12
+ [O, O, O, O, O],
+ [X, O, X, O, X],
+ [O, O, X, O, O],
+ [X, O, O, O, X],
+ [X, O, X, O, X],
+ ],
+ [ // 13
+ [X, X, X, O, X],
+ [X, X, O, X, O],
+ [X, O, X, O, X],
+ [O, X, O, X, X],
+ [X, O, X, X, X],
+ ],
+ [ // 14
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [X, O, X, X, X],
+ [X, O, X, X, X],
+ [X, O, X, X, X],
+ ],
+ [ // 15
+ [X, X, X, X, X],
+ [X, O, X, X, X],
+ [X, X, X, X, X],
+ [X, O, X, X, X],
+ [X, X, X, X, X],
+ ],
+ [ // 16
+ [O, X, X, X, X],
+ [O, X, X, X, X],
+ [O, X, X, X, X],
+ [O, X, X, X, X],
+ [O, O, O, O, O],
+ ],
+ [ // 17
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [X, X, O, X, X],
+ [X, O, O, O, X],
+ [O, O, O, O, O],
+ ],
+ [ // 18
+ [X, X, O, X, X],
+ [X, O, X, O, X],
+ [O, X, O, X, O],
+ [X, O, X, O, X],
+ [X, X, O, X, X],
+ ],
+ [ // 19
+ [O, X, O, X, O],
+ [X, X, X, X, X],
+ [O, X, O, X, O],
+ [X, X, X, X, X],
+ [O, X, O, X, O],
+ ],
+ [ // 20
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [O, X, X, X, O],
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ ],
+ [ // 21
+ [X, O, O, O, O],
+ [X, O, X, X, X],
+ [X, O, O, O, X],
+ [X, O, X, X, X],
+ [X, O, X, X, X],
+ ],
+ [ // 22
+ [X, O, O, O, X],
+ [O, X, X, X, O],
+ [O, X, X, X, O],
+ [O, X, X, X, O],
+ [X, O, O, O, X],
+ ],
+ [ // 23
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [X, X, O, O, O],
+ [X, X, O, O, X],
+ [X, X, O, X, X],
+ ],
+ [ // 24
+ [X, X, X, X, X],
+ [X, X, X, X, X],
+ [O, X, X, X, O],
+ [O, O, O, O, O],
+ [X, O, X, X, O],
+ ],
+ [ // 25
+ [O, X, X, X, X],
+ [O, O, X, X, X],
+ [O, O, O, X, X],
+ [O, O, O, O, X],
+ [X, O, O, O, O],
+ ],
+ ];
+
+ Console.OutputEncoding = Encoding.UTF8;
+ int level = 0;
+ bool[][] board =
+ [
+ [O, O, O, O, O],
+ [O, O, O, O, O],
+ [O, O, O, O, O],
+ [O, O, O, O, O],
+ [O, O, O, O, O],
+ ];
+ SetBoard();
+ (int Left, int Top) cursor = (0, 0);
+ while (true)
+ {
+ await RenderBoard();
+ await Console.Write($"""
+
+ Turn off all the lights. Level {level + 1}.
+
+ Controls:
+ - arrow keys: move cursor
+ - enter: flip lights
+ - backspace: reset level
+ - escape: close game
+ """);
+ await Console.SetCursorPosition(2 * cursor.Left, cursor.Top);
+ Console.CursorVisible = false;
+ switch ((await Console.ReadKey(true)).Key)
+ {
+ case ConsoleKey.LeftArrow: cursor.Left = cursor.Left <= 0 ? Length - 1 : cursor.Left - 1; break;
+ case ConsoleKey.RightArrow: cursor.Left = cursor.Left >= Length - 1 ? 0 : cursor.Left + 1; break;
+ case ConsoleKey.UpArrow: cursor.Top = cursor.Top <= 0 ? Length - 1 : cursor.Top - 1; break;
+ case ConsoleKey.DownArrow: cursor.Top = cursor.Top >= Length - 1 ? 0 : cursor.Top + 1; break;
+ case ConsoleKey.Backspace: SetBoard(); break;
+ case ConsoleKey.Escape: goto Close;
+ case ConsoleKey.Enter:
+ board[cursor.Top][cursor.Left] = !board[cursor.Top][cursor.Left];
+ if (cursor.Top > 0) board[cursor.Top - 1][cursor.Left] = !board[cursor.Top - 1][cursor.Left];
+ if (cursor.Top < Length - 1) board[cursor.Top + 1][cursor.Left] = !board[cursor.Top + 1][cursor.Left];
+ if (cursor.Left > 0) board[cursor.Top][cursor.Left - 1] = !board[cursor.Top][cursor.Left - 1];
+ if (cursor.Left < Length - 1) board[cursor.Top][cursor.Left + 1] = !board[cursor.Top][cursor.Left + 1];
+ if (LightsOut())
+ {
+ await Console.Clear();
+ await RenderBoard();
+ await Console.Write($"""
+
+ You turned off all the lights!
+ Level {level + 1} complete.
+
+ Controls:
+ - enter: next level
+ - escape: close game
+ """);
+ switch ((await Console.ReadKey(true)).Key)
+ {
+ case ConsoleKey.Escape: goto Close;
+ case ConsoleKey.Enter:
+ level++;
+ SetBoard();
+ await Console.Clear();
+ break;
+ }
+ }
+ break;
+ }
+ }
+ Close:
+ await Console.Clear();
+ await Console.WriteLine("Lights Out was closed.");
+ Console.CursorVisible = true;
+
+ void SetBoard()
+ {
+ for (int i = 0; i < Length; i++)
+ {
+ for (int j = 0; j < Length; j++)
+ {
+ board[i][j] = levels[level][i][j];
+ }
+ }
+ }
+
+ bool LightsOut()
+ {
+ for (int i = 0; i < Length; i++)
+ {
+ for (int j = 0; j < Length; j++)
+ {
+ if (board[i][j])
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ async Task RenderBoard()
+ {
+ StringBuilder render = new();
+ for (int i = 0; i < Length; i++)
+ {
+ for (int j = 0; j < 3; j++)
+ {
+ for (int k = 0; k < Length; k++)
+ {
+ switch (j)
+ {
+ case 0: render.Append((k, i) == cursor ? "╔═╤═╗" : "╭───╮"); break;
+ case 1:
+ render.Append((k, i) == cursor ? '╟' : '│');
+ render.Append(board[i][k] ? "███" : " ");
+ render.Append((k, i) == cursor ? '╢' : '│');
+ break;
+ case 2: render.Append((k, i) == cursor ? "╚═╧═╝" : "╰───╯"); break;
+ }
+ }
+ render.AppendLine();
+ }
+ }
+ await Console.SetCursorPosition(0, 0);
+ await Console.Write(render);
+ }
+ }
+}
diff --git a/Projects/Website/Pages/Lights Out.razor b/Projects/Website/Pages/Lights Out.razor
new file mode 100644
index 00000000..ed59641e
--- /dev/null
+++ b/Projects/Website/Pages/Lights Out.razor
@@ -0,0 +1,53 @@
+@using System
+
+@page "/Lights Out"
+
+Lights Out
+
+Lights Out
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ⌨ Keyboard input is supported if you click on the game.
+
+
+
+ ↻ You can restart the game by refreshing the page.
+
+
+@code
+{
+ Games.Lights_Out.Lights_Out Game;
+ BlazorConsole Console;
+
+ public Lights_Out()
+ {
+ Game = new();
+ Console = Game.Console;
+ Console.WindowWidth = 35;
+ Console.WindowHeight = 24;
+ Console.TriggerRefresh = StateHasChanged;
+ }
+
+ protected override void OnInitialized() => InvokeAsync(Game.Run);
+}
diff --git a/Projects/Website/Shared/NavMenu.razor b/Projects/Website/Shared/NavMenu.razor
index f6fa5c5f..3583f87f 100644
--- a/Projects/Website/Shared/NavMenu.razor
+++ b/Projects/Website/Shared/NavMenu.razor
@@ -78,6 +78,11 @@
Hangman
+
+
+ Lights Out
+
+
Wordle
diff --git a/README.md b/README.md
index 1a391df0..8b21181e 100644
--- a/README.md
+++ b/README.md
@@ -39,6 +39,7 @@
|[Tower Of Hanoi](Projects/Tower%20Of%20Hanoi)|1|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Tower%20Of%20Hanoi) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Tower%20Of%20Hanoi%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Clicker](Projects/Clicker)|1|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Clicker) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Clicker%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Hangman](Projects/Hangman)|2|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Hangman) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Hangman%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
+|[Lights Out](Projects/Lights%20Out)|2|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Lights%20Out) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Lights%20Out%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Wordle](Projects/Wordle)|2|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Wordle) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Wordle%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Memory](Projects/Memory)|2|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Memory) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Memory%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Connect 4](Projects/Connect%204)|2|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Connect%204) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Connect%204%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
@@ -47,9 +48,9 @@
|[Rythm](Projects/Rythm)|2|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Rythm) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Rythm%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Type](Projects/Type)|2|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Type) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Type%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Drive](Projects/Drive)|2|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Drive) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Drive%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
-|[Sliding Puzzle](Projects/Sliding%20Puzzle)|2|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Sliding%20Puzzle) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Sliding%20Puzzle%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
+|[Sliding Puzzle](Projects/Sliding%20Puzzle)|2|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Sliding%20Puzzle) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Sliding%20Puzzle%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Snake](Projects/Snake)|3|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Snake) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Snake%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
-|[Word Search](Projects/Word%20Search)|3|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Word%20Search) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Word%20Search%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
+|[Word Search](Projects/Word%20Search)|3|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Word%20Search) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Word%20Search%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Hurdles](Projects/Hurdles)|3|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Hurdles) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Hurdles%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Pong](Projects/Pong)|3|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Pong) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Pong%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Flappy Bird](Projects/Flappy%20Bird)|3|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Flappy%20Bird) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Flappy%20Bird%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
@@ -65,7 +66,7 @@
|[Tents](Projects/Tents)|4|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Tents) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Tents%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Battleship](Projects/Battleship)|4|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Battleship) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Battleship%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Checkers](Projects/Checkers)|4|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Checkers) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Checkers%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)
*_[Community Contribution](https://github.com/dotnet/dotnet-console-games/pull/40)_|
-|[Duck Hunt](Projects/Duck%20Hunt)|5|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Duck%20Hunt) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Duck%20Hunt%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)
*_[Community Contribution](https://github.com/dotnet/dotnet-console-games/pull/39)_|
+|[Duck Hunt](Projects/Duck%20Hunt)|5|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Duck%20Hunt) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Duck%20Hunt%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)
*_[Community Contribution](https://github.com/dotnet/dotnet-console-games/pull/39)_|
|[Blackjack](Projects/Blackjack)|5|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Blackjack) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Blackjack%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Fighter](Projects/Fighter)|5|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Fighter) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Fighter%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
|[Maze](Projects/Maze)|5|[![Play Now](.github/resources/play-badge.svg)](https://dotnet.github.io/dotnet-console-games/Maze) [![Status](https://github.com/dotnet/dotnet-console-games/workflows/Maze%20Build/badge.svg)](https://github.com/dotnet/dotnet-console-games/actions)|
diff --git a/dotnet-console-games.sln b/dotnet-console-games.sln
index 44d7a1b5..e0cfdce3 100644
--- a/dotnet-console-games.sln
+++ b/dotnet-console-games.sln
@@ -107,6 +107,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tetris", "Projects\Tetris\T
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Word Search", "Projects\Word Search\Word Search.csproj", "{A1536214-8984-4528-90DF-F465EB491685}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lights Out", "Projects\Lights Out\Lights Out.csproj", "{31AE3F64-98FC-40E8-9A10-7276B0F8E726}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -321,6 +323,10 @@ Global
{A1536214-8984-4528-90DF-F465EB491685}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1536214-8984-4528-90DF-F465EB491685}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A1536214-8984-4528-90DF-F465EB491685}.Release|Any CPU.Build.0 = Release|Any CPU
+ {31AE3F64-98FC-40E8-9A10-7276B0F8E726}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {31AE3F64-98FC-40E8-9A10-7276B0F8E726}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {31AE3F64-98FC-40E8-9A10-7276B0F8E726}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {31AE3F64-98FC-40E8-9A10-7276B0F8E726}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/dotnet-console-games.slnf b/dotnet-console-games.slnf
index 19f8a510..dd21dfb9 100644
--- a/dotnet-console-games.slnf
+++ b/dotnet-console-games.slnf
@@ -1,58 +1,59 @@
{
- "solution": {
- "path": "dotnet-console-games.sln",
- "projects": [
- "Projects\\2048\\2048.csproj",
- "Projects\\Battleship\\Battleship.csproj",
- "Projects\\Beep Pad\\Beep Pad.csproj",
- "Projects\\Bound\\Bound.csproj",
- "Projects\\Blackjack\\Blackjack.csproj",
- "Projects\\Checkers\\Checkers.csproj",
- "Projects\\Clicker\\Clicker.csproj",
- "Projects\\Connect 4\\Connect 4.csproj",
- "Projects\\Console Monsters\\Console Monsters.csproj",
- "Projects\\Darts\\Darts.csproj",
- "Projects\\Dice Game\\Dice Game.csproj",
- "Projects\\Draw\\Draw.csproj",
- "Projects\\Drive\\Drive.csproj",
- "Projects\\Duck Hunt\\Duck Hunt.csproj",
- "Projects\\Fighter\\Fighter.csproj",
- "Projects\\Flappy Bird\\Flappy Bird.csproj",
- "Projects\\Flash Cards\\Flash Cards.csproj",
- "Projects\\Guess A Number\\Guess A Number.csproj",
- "Projects\\Gravity\\Gravity.csproj",
- "Projects\\Hangman\\Hangman.csproj",
- "Projects\\Helicopter\\Helicopter.csproj",
- "Projects\\Hurdles\\Hurdles.csproj",
- "Projects\\Mancala\\Mancala.csproj",
- "Projects\\Maze\\Maze.csproj",
- "Projects\\Memory\\Memory.csproj",
- "Projects\\Minesweeper\\Minesweeper.csproj",
- "Projects\\Oligopoly\\Oligopoly.csproj",
- "Projects\\PacMan\\PacMan.csproj",
- "Projects\\Pong\\Pong.csproj",
- "Projects\\Quick Draw\\Quick Draw.csproj",
- "Projects\\Rock Paper Scissors\\Rock Paper Scissors.csproj",
- "Projects\\Role Playing Game\\Role Playing Game.csproj",
- "Projects\\Roll And Move\\Roll And Move.csproj",
- "Projects\\Rythm\\Rythm.csproj",
- "Projects\\Shmup\\Shmup.csproj",
- "Projects\\Simon\\Simon.csproj",
- "Projects\\Sliding Puzzle\\Sliding Puzzle.csproj",
- "Projects\\Snake\\Snake.csproj",
- "Projects\\Sudoku\\Sudoku.csproj",
- "Projects\\Tanks\\Tanks.csproj",
- "Projects\\Tetris\\Tetris.csproj",
- "Projects\\Tic Tac Toe\\Tic Tac Toe.csproj",
- "Projects\\Tents\\Tents.csproj",
- "Projects\\Tower Of Hanoi\\Tower Of Hanoi.csproj",
- "Projects\\Tug Of War\\Tug Of War.csproj",
- "Projects\\Type\\Type.csproj",
- "Projects\\Whack A Mole\\Whack A Mole.csproj",
- "Projects\\Word Search\\Word Search.csproj",
- "Projects\\Wordle\\Wordle.csproj",
- "Projects\\Wumpus World\\Wumpus World.csproj",
- "Projects\\Yahtzee\\Yahtzee.csproj",
- ]
- }
+ "solution": {
+ "path": "dotnet-console-games.sln",
+ "projects": [
+ "Projects\\2048\\2048.csproj",
+ "Projects\\Battleship\\Battleship.csproj",
+ "Projects\\Beep Pad\\Beep Pad.csproj",
+ "Projects\\Bound\\Bound.csproj",
+ "Projects\\Blackjack\\Blackjack.csproj",
+ "Projects\\Checkers\\Checkers.csproj",
+ "Projects\\Clicker\\Clicker.csproj",
+ "Projects\\Connect 4\\Connect 4.csproj",
+ "Projects\\Console Monsters\\Console Monsters.csproj",
+ "Projects\\Darts\\Darts.csproj",
+ "Projects\\Dice Game\\Dice Game.csproj",
+ "Projects\\Draw\\Draw.csproj",
+ "Projects\\Drive\\Drive.csproj",
+ "Projects\\Duck Hunt\\Duck Hunt.csproj",
+ "Projects\\Fighter\\Fighter.csproj",
+ "Projects\\Flappy Bird\\Flappy Bird.csproj",
+ "Projects\\Flash Cards\\Flash Cards.csproj",
+ "Projects\\Guess A Number\\Guess A Number.csproj",
+ "Projects\\Gravity\\Gravity.csproj",
+ "Projects\\Hangman\\Hangman.csproj",
+ "Projects\\Helicopter\\Helicopter.csproj",
+ "Projects\\Hurdles\\Hurdles.csproj",
+ "Projects\\Lights Out\\Lights Out.csproj",
+ "Projects\\Mancala\\Mancala.csproj",
+ "Projects\\Maze\\Maze.csproj",
+ "Projects\\Memory\\Memory.csproj",
+ "Projects\\Minesweeper\\Minesweeper.csproj",
+ "Projects\\Oligopoly\\Oligopoly.csproj",
+ "Projects\\PacMan\\PacMan.csproj",
+ "Projects\\Pong\\Pong.csproj",
+ "Projects\\Quick Draw\\Quick Draw.csproj",
+ "Projects\\Rock Paper Scissors\\Rock Paper Scissors.csproj",
+ "Projects\\Role Playing Game\\Role Playing Game.csproj",
+ "Projects\\Roll And Move\\Roll And Move.csproj",
+ "Projects\\Rythm\\Rythm.csproj",
+ "Projects\\Shmup\\Shmup.csproj",
+ "Projects\\Simon\\Simon.csproj",
+ "Projects\\Sliding Puzzle\\Sliding Puzzle.csproj",
+ "Projects\\Snake\\Snake.csproj",
+ "Projects\\Sudoku\\Sudoku.csproj",
+ "Projects\\Tanks\\Tanks.csproj",
+ "Projects\\Tetris\\Tetris.csproj",
+ "Projects\\Tic Tac Toe\\Tic Tac Toe.csproj",
+ "Projects\\Tents\\Tents.csproj",
+ "Projects\\Tower Of Hanoi\\Tower Of Hanoi.csproj",
+ "Projects\\Tug Of War\\Tug Of War.csproj",
+ "Projects\\Type\\Type.csproj",
+ "Projects\\Whack A Mole\\Whack A Mole.csproj",
+ "Projects\\Word Search\\Word Search.csproj",
+ "Projects\\Wordle\\Wordle.csproj",
+ "Projects\\Wumpus World\\Wumpus World.csproj",
+ "Projects\\Yahtzee\\Yahtzee.csproj",
+ ]
+ }
}
\ No newline at end of file