Advertisement
VidarBroberg

Untitled

Oct 7th, 2021
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.10 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace BreakOut
  8. {
  9.     class MyProgram
  10.     {
  11.  
  12.         public void Run()
  13.         {
  14.             #region Movement
  15.  
  16.             Console.SetCursorPosition(0, 15);
  17.             for (int i = 1; i < 100; i++)
  18.             {
  19.                 Console.Write("@");
  20.                 System.Threading.Thread.Sleep(10);
  21.                 Console.SetCursorPosition(i - 1, 15);
  22.                 Console.Write(" ");
  23.  
  24.            
  25.             }
  26.            
  27.                 Console.SetCursorPosition(100, 15);
  28.                 for (int i = 100; i > 0; i--)
  29.                 {
  30.                     Console.Write("@");
  31.                     System.Threading.Thread.Sleep(10);
  32.                 Console.Write(" ");
  33.                 Console.SetCursorPosition(i+1, 15);
  34.                    
  35.  
  36.                 }
  37.  
  38.  
  39.             #endregion
  40.  
  41.             int directionX = 1;
  42.             int directionY = 1;
  43.             int posX = 0;
  44.             int posY = 15;
  45.  
  46.            
  47.  
  48.  
  49.  
  50.  
  51.  
  52.         }
  53.  
  54.     }
  55. }
  56.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement