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); }
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); }
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(); }
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); }
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)); } }
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); } }
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); } }
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); }
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); } }
public static void Erase(int x, int y, string text) { Pixel.Draw(x, y, new String(' ', text.Length), ConsoleColor.Gray); }
public static void Draw(int x, int y) { Pixel.Draw(x, y, '@', ConsoleColor.DarkMagenta); }
public void Draw() { Pixel.Draw(this.Coordinate.X, this.Coordinate.Y, this.Symbol, this.Color); }
public void Erase() { Pixel.Draw(x + 4, y + 30, YourScore.ToString(), ConsoleColor.White); }
public void AutorsDraw(int x, int y, ConsoleColor color) { Pixel.Draw(x, ++y, "by Team Chipmunk", color); Pixel.Draw(x, ++y, "Telerik Academy", color); }
public void TetrisDraw(int x, int y, ConsoleColor color) { Pixel.Draw(x, ++y, "TETRIS GAME", color); }
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); }