Example #1
0
 public void Draw()
 {
     Pixel.Draw(x + 4, y + 2, "-------------", Game.Colors.Foreground);
     Pixel.Draw(x + 4, y + 3, "-Next Symbol-", Game.Colors.TextColor);
     Pixel.Draw(x + 4, y + 4, "-------------", Game.Colors.Foreground);
     this.FallingObject.Draw(x + 10, y + 8);
 }
Example #2
0
 public void Draw()
 {
     Pixel.Draw(x + 4, y + 27, "-------------", Game.Colors.Foreground);
     Pixel.Draw(x + 4, y + 28, "-Your Score:-", Game.Colors.TextColor);
     Pixel.Draw(x + 4, y + 29, "-------------", Game.Colors.Foreground);
     Pixel.Draw(x + 4, y + 30, this.YourScore.ToString().PadLeft(13), Game.Colors.Foreground);
 }
Example #3
0
 public void Draw()
 {
     for (int row = x + 4; row <= x + 16; row++)
     {
         Pixel.Draw(row, y + 37, '-', Game.Colors.Foreground);
         Pixel.Draw(row, y + 39, '-', Game.Colors.Foreground);
     }
     DrawTime();
 }
Example #4
0
 public void Draw()
 {
     Pixel.Draw(x + 4, y + 14, "-------------", Game.Colors.Foreground);
     Pixel.Draw(x + 4, y + 15, "--Controls:--", Game.Colors.TextColor);
     Pixel.Draw(x + 4, y + 16, "-------------", Game.Colors.Foreground);
     Pixel.Draw(x + 4, y + 17, "↑ Rotate", Game.Colors.Foreground);
     Pixel.Draw(x + 4, y + 18, "↓ Move Down", Game.Colors.Foreground);
     Pixel.Draw(x + 4, y + 19, "← Move Left ", Game.Colors.Foreground);
     Pixel.Draw(x + 4, y + 20, "→ Move right", Game.Colors.Foreground);
     Pixel.Draw(x + 4, y + 21, "Space ►/=", Game.Colors.Foreground);
     Pixel.Draw(x + 4, y + 22, "Esc to Quit", Game.Colors.Foreground);
 }
Example #5
0
        private void EraseRow(int i)
        {
            Pixel.Draw(topLeftPlayGround.X + 1, i, new String('*', levelElementsCount[i]), ConsoleColor.Red);
            Thread.Sleep(Game.Speed);
            Pixel.Draw(topLeftPlayGround.X + 1, i, new String('*', levelElementsCount[i]), ConsoleColor.Green);
            Thread.Sleep(Game.Speed);
            Pixel.Draw(topLeftPlayGround.X + 1, i, new String('*', levelElementsCount[i]), ConsoleColor.Cyan);
            Thread.Sleep(Game.Speed);
            Pixel.Draw(topLeftPlayGround.X + 1, i, new String('*', levelElementsCount[i]), ConsoleColor.Red);
            Thread.Sleep(Game.Speed);

            Pixel.Erase(topLeftPlayGround.X + 1, i, new String(' ', levelElementsCount[i]));
            for (int x = topLeftPlayGround.X + 1; x < bottomRightPlayGround.X; x++)
            {
                this.body.Remove(new Pixel(x, i, ' ', ConsoleColor.Gray));
            }
        }
Example #6
0
        public void WelcomeDraw(ConsoleColor textColor, ConsoleColor borderColor)
        {
            int x = TopLeftPlayGround.X - 3;
            int y = TopLeftPlayGround.Y + 5;

            for (int i = 0; i < 2; i++)
            {
                Pixel.Draw(x, ++y, new String('-', 30), borderColor);
            }

            Pixel.Draw(x, ++y, "  WELCOME to Chipmunk Tetris! ".PadRight(10, ' '), textColor);
            Pixel.Draw(x, ++y, "     Press any key to start   ", textColor);

            for (int i = 0; i < 2; i++)
            {
                Pixel.Draw(x, ++y, new String('-', 30), borderColor);
            }
        }
Example #7
0
        public void PauseDraw(ConsoleColor textColor, ConsoleColor borderColor)
        {
            int x = TopLeftPlayGround.X - 3;
            int y = TopLeftPlayGround.Y + 5;

            for (int i = 0; i < 2; i++)
            {
                Pixel.Draw(x, ++y, new String('-', 20), borderColor);
            }

            Pixel.Draw(x, ++y, "The Game Is Paused!".PadRight(10, ' '), textColor);
            Pixel.Draw(x, ++y, "Press Space to Play", textColor);

            for (int i = 0; i < 2; i++)
            {
                Pixel.Draw(x, ++y, new String('-', 20), borderColor);
            }
        }
Example #8
0
        public void Draw()
        {
            TetrisDraw(endX + 5, startY - 1, Game.Colors.TextColor);
            //vertical
            for (int col = startY; col <= endY; col++)
            {
                Pixel.Draw(startX, col, '#', Game.Colors.Foreground);
                Pixel.Draw(endX, col, '#', Game.Colors.Foreground);
            }
            //horizontal
            for (int row = startX; row <= endX; row++)
            {
                Pixel.Draw(row, startY, '#', Game.Colors.Foreground);
                Pixel.Draw(row, endY, '#', Game.Colors.Foreground);
            }

            AutorsDraw(endX + 3, endY + 1, Game.Colors.TextColor);
        }
Example #9
0
        public void GameOverDraw(ConsoleColor textColor, ConsoleColor borderColor)
        {
            int x = TopLeftPlayGround.X - 3;
            int y = TopLeftPlayGround.Y + 5;

            for (int i = 0; i < 2; i++)
            {
                Pixel.Draw(x, ++y, new String('-', 20), borderColor);
            }

            Pixel.Draw(x, ++y, "      GAME OVER     ".PadRight(10, ' '), textColor);
            Pixel.Draw(x, ++y, "Press Space to Play!", textColor);
            Pixel.Draw(x, ++y, "Press Escape to Exit", textColor);

            for (int i = 0; i < 2; i++)
            {
                Pixel.Draw(x, ++y, new String('-', 20), borderColor);
            }
        }
Example #10
0
 public static void Erase(int x, int y, string text)
 {
     Pixel.Draw(x, y, new String(' ', text.Length), ConsoleColor.Gray);
 }
Example #11
0
 public static void Draw(int x, int y)
 {
     Pixel.Draw(x, y, '@', ConsoleColor.DarkMagenta);
 }
Example #12
0
 public void Draw()
 {
     Pixel.Draw(this.Coordinate.X, this.Coordinate.Y, this.Symbol, this.Color);
 }
Example #13
0
 public void Erase()
 {
     Pixel.Draw(x + 4, y + 30, YourScore.ToString(), ConsoleColor.White);
 }
Example #14
0
 public void AutorsDraw(int x, int y, ConsoleColor color)
 {
     Pixel.Draw(x, ++y, "by Team Chipmunk", color);
     Pixel.Draw(x, ++y, "Telerik Academy", color);
 }
Example #15
0
 public void TetrisDraw(int x, int y, ConsoleColor color)
 {
     Pixel.Draw(x, ++y, "TETRIS GAME", color);
 }
Example #16
0
 public void DrawTime()
 {
     Pixel.Draw(x + 7, y + 38, String.Format("{0}:{1}:{2}",
                                             time.Hours.ToString().PadLeft(2, '0'), time.Minutes.ToString().PadLeft(2, '0'),
                                             time.Seconds.ToString().PadLeft(2, '0')), Game.Colors.TextColor);
 }