예제 #1
0
 public override void Rij()
 {
     Console2.WriteLine("De broemmer is gestolen!", ConsoleColor.Red);
 }
예제 #2
0
 public override void Rij()
 {
     Console2.WriteLine("De auto rijdt...", ConsoleColor.Red);
 }
예제 #3
0
 public override void Rij()
 {
     Console2.WriteLine("De vrachtwagen rijdt...", ConsoleColor.Red);
 }
예제 #4
0
 public virtual void Rij()
 {
     Console2.WriteLine("Het {{voertuig}} rijdt...", ConsoleColor.White, kleur);
 }
예제 #5
0
        // Parset een Mustache-achtige-template-string (met max. 1 parameter) en print deze op de console
        // met de parameter in de accentedColor.
        public static void Write(string str, ConsoleColor basicColor, ConsoleColor accentedColor)
        {
            string before   = "";
            string accented = "";
            string after    = "";

            LexerState ps = LexerState.BEFORE;

            foreach (char c in str)
            {
                switch (ps)
                {
                case LexerState.BEFORE:
                    if (c != '{')
                    {
                        before += c;
                    }
                    else
                    {
                        ps = LexerState.FIRST_OPENING_BRACE;
                    }
                    break;

                case LexerState.FIRST_OPENING_BRACE:
                    if (c == '{')
                    {
                        ps = LexerState.SECOND_OPENING_BRACE;
                    }
                    else
                    {
                        ps      = LexerState.BEFORE;
                        before += '{';
                        before += c;
                    }
                    break;

                case LexerState.SECOND_OPENING_BRACE:
                    if (c == '}')
                    {
                        ps = LexerState.FIRST_CLOSING_BRACE;
                    }
                    else
                    {
                        ps        = LexerState.ACCENTED;
                        accented += c;
                    }
                    break;

                case LexerState.ACCENTED:
                    if (c == '}')
                    {
                        ps = LexerState.FIRST_CLOSING_BRACE;
                    }
                    else
                    {
                        accented += c;
                    }
                    break;

                case LexerState.FIRST_CLOSING_BRACE:
                    if (c == '}')
                    {
                        ps = LexerState.SECOND_CLOSING_BRACE;
                    }
                    else
                    {
                        accented += '}';
                        accented += c;
                    }
                    break;

                case LexerState.SECOND_CLOSING_BRACE:
                    ps     = LexerState.AFTER;
                    after += c;
                    break;

                case LexerState.AFTER:
                    after += c;
                    break;
                }
            }

            Console2.Write(before, basicColor);
            Console2.Write(accented, accentedColor);
            Console2.WriteLine(after, basicColor);
        }
예제 #6
0
 public static void WriteLine(string str, ConsoleColor color)
 {
     Console2.Write(str, color);
     Console.WriteLine();
 }
예제 #7
0
 public static void WriteLine(string str, ConsoleColor basicColor, ConsoleColor accentedColor)
 {
     Console2.Write(str, basicColor, accentedColor);
 }
예제 #8
0
 public void Steel()
 {
     Console2.WriteLine("Voertuig werd gestolen door " + naam, ConsoleColor.Yellow);
     Console2.WriteLine("GAME OVER", ConsoleColor.Green);
 }