//print the buffer with no prompt: public static void prompt() { Console.Clear(); Console.Write(Game_Utilities.wrap(output_buffer, Console.WindowWidth)); Console.Write(">"); output_buffer = ""; // clear the buffer when done. }
// print the buffer public static void print() { Console.Clear(); //wrap the text to fit onto the screen correctly Console.Write(Game_Utilities.wrap(output_buffer, Console.WindowWidth)); Console.WriteLine("What would you like to do?"); Console.Write(">"); output_buffer = ""; // clear the buffer when done. }
public static void end_game(string endText) { Program.quit = true; Console.Clear(); Console.WriteLine(Game_Utilities.wrap(endText, Console.WindowWidth)); //force to close window after game ends... Console.WriteLine("You may now close this window."); Console.CursorVisible = false; //infanite loop so no action can be taken... while (true) { Console.ReadKey(true); } }
//Welcone Screen public static void title_screen() { Console.Clear(); Console.WriteLine(); Console.WriteLine(Game_Utilities.wrap("*** Welcome to Generic Adventure Time!" + " A gaming experiment by Jeff Heytow, novice programmer. ***", Console.WindowWidth)); Console.WriteLine(Game_Utilities.wrap("\n\nPlease note that you can type 'help' " + "at any time to see a list of available commands.", Console.WindowWidth)); Console.WriteLine("\nPress any key to begin..."); Console.CursorVisible = false; //get rid of the cursor Console.ReadKey(); Console.CursorVisible = true; // bring cursor back this.room_enemies Keyword 'this' is not valid in a static property, static method, or static field initializer Console.Clear(); }