コード例 #1
0
        // Display current UFO animation
        //	and	a placeholder for codeword and its length
        public void Display()
        {
            Greet();
            // Print the ufo
            Console.WriteLine(ufo.Stringify());

            // Print the placeholder word (current word)
            Console.ForegroundColor = ConsoleColor.DarkGreen;
            Console.Write("{0}", CurrentWord);
            Console.ResetColor();

            // Print the number of letters in the codeword
            Console.Write(" - ({0} letters)\n", CurrentWord.Length);
            Console.Write("Guesses left: ");

            // Print current number of guesses left
            Console.ForegroundColor = ConsoleColor.Red;
            Console.Write("{0}", MaxGuesses - CurrentNumWrongGuesses);
            Console.ResetColor();

            // Print the letters used so far
            Console.Write("\nUsed letters: ");
            foreach (string letter in letterList)
            {
                Console.Write("{0 }", letter);
            }
        }
コード例 #2
0
 public void Display()
 {
     Console.WriteLine(u.Stringify());
     Console.WriteLine(currentWord);
     Console.Write($"You have {maxNumGuesses} guesses. You used: ");
     Console.WriteLine(currentNumGuesses);
 }
コード例 #3
0
 public void Display()
 {
     Console.WriteLine(this.codeWord);
     Console.WriteLine(ufo.Stringify());
     Console.WriteLine(CurrentWordMaker(this.CurrentWord));
     Console.WriteLine($"Guesses remaining: {numberOfGuess - wrongGuess}");
     Console.WriteLine($"Wrong guesses: {displayPrevious()}");
 }
コード例 #4
0
 public void Display()
 {
     Console.WriteLine(spaceship.Stringify());
     Console.WriteLine($"Current word: {CurrentWord}\n");
     Console.WriteLine($"Incorrect guesses: {WrongGuesses}\n");
 }
コード例 #5
0
 /// <summary>
 /// print all the necessary game information to the screen including the UFO, the currentWord, the number of wrong guesses
 /// </summary>
 public void Display()
 {
     Console.WriteLine(ufo.Stringify());
     Console.WriteLine($"Current word is: {CurrentWord}");
     Console.WriteLine($"Remaining Number of Guess: {CurrentNumberOfWrongGuess}");
 }
コード例 #6
0
ファイル: Game.cs プロジェクト: AGEORGIOU4/Spaceman
 public void Display()
 {
     Console.WriteLine(u.Stringify());
     Console.WriteLine($"Current word: {currentword}\n");
     Console.WriteLine("Number of guesses remaining: " + (maxNumOfGuesses - currentNumOfWrongGuesses));
 }
コード例 #7
0
ファイル: Game.cs プロジェクト: Xammuel/c_sharp
 public void Display()
 {
     Console.WriteLine(ufo.Stringify());
     Console.WriteLine($"Current Word: {currentWord}");
     Console.WriteLine($"\nGuesses remaining: {maxGuess-wrongGuess}");
 }
コード例 #8
0
ファイル: Game.cs プロジェクト: SnowPrimate/spaceman
 public void Display()
 {
     Console.WriteLine(ufo.Stringify());
     Console.WriteLine("The Current Word is: " + CurrentWord);
     Console.WriteLine($"You have {NumGuesses} attempts");
 }
コード例 #9
0
 public void Display()
 {
     PrintColorMessage(ConsoleColor.Blue, spaceship.Stringify());
     PrintColorMessage(ConsoleColor.Yellow, $"Current word: {CurrentWord}\n");
     PrintColorMessage(ConsoleColor.Yellow, ($"Incorrect guesses: {WrongGuesses}\n"));
 }
コード例 #10
0
ファイル: Game.cs プロジェクト: khaiz18/spaceman
 public void Display()
 {
     Console.WriteLine(spaceShip.Stringify());
     Console.WriteLine($"Current word: {word}");
     Console.WriteLine($"Wrong Guesses: {wrongNum}");
 }
コード例 #11
0
ファイル: Game.cs プロジェクト: Wings30306/Spaceman
 public void Display()
 {
     Console.WriteLine(spaceship.Stringify());
     Console.WriteLine(currentWord);
     Console.WriteLine($"You have {maxWrongGuesses - currentWrongGuesses} wrong guesses remaining.");
 }