static void Main(string[] args) { WelcomeScreen w = new WelcomeScreen(); w.Display(); bool finished = false; do { MenuScreen menu = new MenuScreen(); menu.Display(); switch (menu.GetChosenOption()) { case MenuScreen.PLAY: Game g = new Game(); g.Run(); break; case MenuScreen.CREDITS: CreditsScreen c = new CreditsScreen(); c.Display(); break; case MenuScreen.QUIT: finished = true; break; } }while (!finished); }
public static void Main(string[] args) { // Check if terminal container is not too small if (!ResolutionHandler.IsSupportedResolution()) { throw new ApplicationException( "The terminal window is too small. Please change window to the fullscreen mode."); } // Initialize player/villages instances Villages = new GameVillages(); Player = new Player(Villages.GetRandomVillage()); // Initialize render pipeline RenderPipeline.Add(new PlayerStatsBar()); // Display the welcome message (game instructions) WelcomeScreen.Display(); // Display the main menu while (true) { /* * // Constantly invoke main menu printing when thread is not busy * // That way every task (other menu) can avoid memory recursion and * // just skip the task, knowing that program will navigate user * // to the main menu anyway. */ ActionGroupsMenu.Display(); } }
// Main loop of the welcome screen public static void Main() { // Established Windows Size Console.SetWindowSize(140, 35); WelcomeScreen Welcome = new WelcomeScreen(); Welcome.Display(); }
static void Main(string[] args) { Hardware.Show(1024, 600, 24); WelcomeScreen welcomeScreen = new WelcomeScreen(); GameScreen game = new GameScreen(); welcomeScreen.Display(); game.Show(); }
// Created the structure to choose the movements public void Movements() { string move; ShowMovements(); move = Console.ReadLine(); switch (move.ToUpper()) { case "1": Players[Index].Fold(); break; case "2": Players[Index].Check(); break; case "3": Players[Index].Call(); Players[Index].Chips -= Players[Index - 1].Pot; pot += Players[Index - 1].Pot; break; case "4": pot += Players[Index].Raise(); break; case "Z": isAbsent = Players[Index].Absent(); break; case "Q": Console.Clear(); Welcome.Display(); break; default: ClearText(); Movements(); break; } for (int i = 0; i < Players.Count - 1; i++) { if (move != "1") { allIsPlay = true; } } }