diff --git a/Check.cs b/Check.cs new file mode 100644 index 0000000000000000000000000000000000000000..51a4bf08e792ef13d0e4fb53182874315848a15f --- /dev/null +++ b/Check.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Mastermind +{ + internal class Check + { + public void CheckGame(int[] input) + { + + + } + } +} diff --git a/MastermindController.cs b/MastermindController.cs index bd69f2ebe08a916f55bf053616585a3744904e20..f8ae25b6385f5b256565f514cf9d38ce0e9057b0 100644 --- a/MastermindController.cs +++ b/MastermindController.cs @@ -21,6 +21,10 @@ namespace Controller Console.WriteLine("Welcome to Mastermind!"); Console.WriteLine("======================"); + Console.WriteLine("Please select a Gamemode:\n"); + Console.WriteLine("[S]ingle Player\n"); + Console.WriteLine("[M]ultiplayer\n"); + // User selects a difficulty Console.WriteLine("Please select the difficulty you would like to play on:\n"); @@ -47,7 +51,7 @@ namespace Controller checkMenu = true; break; case "r": - Program.MainMenu(); + StartMenu.MainMenu(); return; default: Console.WriteLine("Something went wrong! Try again. Only the letters \"E\", \"M\", \"H\". \"R\" are allowed. "); @@ -111,7 +115,7 @@ namespace Controller Console.WriteLine("Returning to main menu"); checkMenu = true; Console.Clear(); - Program.MainMenu(); + StartMenu.MainMenu(); return; default: Console.WriteLine("Something went wrong! Try again! Only the letters \"Y\" and \"N\" are allowed."); diff --git a/Multiplayer.cs b/Multiplayer.cs new file mode 100644 index 0000000000000000000000000000000000000000..5e239277bc5f9c55a4c2fac31b6857b6e9c91b10 --- /dev/null +++ b/Multiplayer.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Mastermind +{ + internal class Multiplayer + { + } +} diff --git a/Singleplayer.cs b/Singleplayer.cs new file mode 100644 index 0000000000000000000000000000000000000000..9fa3534bf3036dfe89ff441630403fbb50d7d1e3 --- /dev/null +++ b/Singleplayer.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Mastermind +{ + internal class Singleplayer + { + } +} diff --git a/Program.cs b/StartMenu.cs similarity index 97% rename from Program.cs rename to StartMenu.cs index fdaefca62075109f91707f29b34ee160a71e1ce6..dd2664728d1bb34a239867c27c9ac5fcf8cc71fd 100644 --- a/Program.cs +++ b/StartMenu.cs @@ -1,56 +1,56 @@ -using System; -using Controller; - -namespace Mastermind -{ - class Program - { - static void Main() - { - { - MainMenu(); - while (true) - { - string? input = Console.ReadLine(); //string? allows for null-value - if (input != null) //"filter out" null values to avoid crash - { - switch (input.ToLower()) - { - case "s": - Console.WriteLine("Starting Game ..."); - MastermindController controller = new(); - controller.Play(); - break; - case "t": - MasterMindTutorial.Tutorial(); - break; - case "q": - return; - default: - Console.WriteLine("Please pick a valid Option."); - break; - } - } - else - { - Console.WriteLine("Please pick a valid Option."); - } - } - } - } - public static void MainMenu() - { - Console.WriteLine("\n███╗ ███╗ █████╗ ███████╗████████╗███████╗██████╗ ███╗ ███╗██╗███╗ ██╗██████╗"); - Console.WriteLine("████╗ ████║██╔â•â•â–ˆâ–ˆâ•—██╔â•â•â•â•â•â•šâ•â•â–ˆâ–ˆâ•”â•â•â•â–ˆâ–ˆâ•”â•â•â•â•â•â–ˆâ–ˆâ•”â•â•â–ˆâ–ˆâ•—████╗ ████║██║████╗ ██║██╔â•â•â–ˆâ–ˆâ•—"); - Console.WriteLine("██╔████╔██║███████║███████╗ ██║ █████╗ ██████╔â•â–ˆâ–ˆâ•”████╔██║██║██╔██╗ ██║██║ ██║"); - Console.WriteLine("██║╚██╔â•â–ˆâ–ˆâ•‘██╔â•â•â–ˆâ–ˆâ•‘â•šâ•â•â•â•â–ˆâ–ˆâ•‘ ██║ ██╔â•â•â• ██╔â•â•â–ˆâ–ˆâ•—██║╚██╔â•â–ˆâ–ˆâ•‘██║██║╚██╗██║██║ ██║"); - Console.WriteLine("██║ â•šâ•â• ██║██║ ██║███████║ ██║ ███████╗██║ ██║██║ â•šâ•â• ██║██║██║ ╚████║██████╔â•"); - Console.WriteLine("â•šâ•â• â•šâ•â•â•šâ•â• â•šâ•â•â•šâ•â•â•â•â•â•â• â•šâ•â• â•šâ•â•â•â•â•â•â•â•šâ•â• â•šâ•â•â•šâ•â• â•šâ•â•â•šâ•â•â•šâ•â• â•šâ•â•â•â•â•šâ•â•â•â•â•â•"); - Console.WriteLine("\nPlease Choose:"); - Console.WriteLine("[S]tart Game"); - Console.WriteLine("[T]utorial"); - Console.WriteLine("[Q]uit"); - } - - } +using System; +using Controller; + +namespace Mastermind +{ + class StartMenu + { + static void Main() + { + { + MainMenu(); + while (true) + { + string? input = Console.ReadLine(); //string? allows for null-value + if (input != null) //"filter out" null values to avoid crash + { + switch (input.ToLower()) + { + case "s": + Console.WriteLine("Starting Game ..."); + MastermindController controller = new(); + controller.Play(); + break; + case "t": + MasterMindTutorial.Tutorial(); + break; + case "q": + return; + default: + Console.WriteLine("Please pick a valid Option."); + break; + } + } + else + { + Console.WriteLine("Please pick a valid Option."); + } + } + } + } + public static void MainMenu() + { + Console.WriteLine("\n███╗ ███╗ █████╗ ███████╗████████╗███████╗██████╗ ███╗ ███╗██╗███╗ ██╗██████╗"); + Console.WriteLine("████╗ ████║██╔â•â•â–ˆâ–ˆâ•—██╔â•â•â•â•â•â•šâ•â•â–ˆâ–ˆâ•”â•â•â•â–ˆâ–ˆâ•”â•â•â•â•â•â–ˆâ–ˆâ•”â•â•â–ˆâ–ˆâ•—████╗ ████║██║████╗ ██║██╔â•â•â–ˆâ–ˆâ•—"); + Console.WriteLine("██╔████╔██║███████║███████╗ ██║ █████╗ ██████╔â•â–ˆâ–ˆâ•”████╔██║██║██╔██╗ ██║██║ ██║"); + Console.WriteLine("██║╚██╔â•â–ˆâ–ˆâ•‘██╔â•â•â–ˆâ–ˆâ•‘â•šâ•â•â•â•â–ˆâ–ˆâ•‘ ██║ ██╔â•â•â• ██╔â•â•â–ˆâ–ˆâ•—██║╚██╔â•â–ˆâ–ˆâ•‘██║██║╚██╗██║██║ ██║"); + Console.WriteLine("██║ â•šâ•â• ██║██║ ██║███████║ ██║ ███████╗██║ ██║██║ â•šâ•â• ██║██║██║ ╚████║██████╔â•"); + Console.WriteLine("â•šâ•â• â•šâ•â•â•šâ•â• â•šâ•â•â•šâ•â•â•â•â•â•â• â•šâ•â• â•šâ•â•â•â•â•â•â•â•šâ•â• â•šâ•â•â•šâ•â• â•šâ•â•â•šâ•â•â•šâ•â• â•šâ•â•â•â•â•šâ•â•â•â•â•â•"); + Console.WriteLine("\nPlease Choose:"); + Console.WriteLine("[S]tart Game"); + Console.WriteLine("[T]utorial"); + Console.WriteLine("[Q]uit"); + } + + } } \ No newline at end of file diff --git a/Tutorial.cs b/Tutorial.cs index 6b76fd2e1a6f4a6fae21592dbe8771320cc8f31f..d34e2fc53e55c0f645a123b74034727b750c5c85 100644 --- a/Tutorial.cs +++ b/Tutorial.cs @@ -35,11 +35,11 @@ namespace Mastermind Console.WriteLine("In this Tutorial Game you will have unlimited tries. Also the Code won't change."); TutorialGame(); Console.Clear(); - Program.MainMenu(); + StartMenu.MainMenu(); return; case "b": Console.Clear(); - Program.MainMenu(); + StartMenu.MainMenu(); return; default: Console.WriteLine("Please pick a valid Option.");