Formato
Plain text
Post date
2019-02-13 21:49
Publication Period
Unlimited
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace super
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. init();
  13. Random r = new Random();
  14. while (true)
  15. {
  16. var b = Console.ReadKey(true);
  17. if (b.Key == ConsoleKey.Escape) break;
  18. int d = r.Next(1, 3);
  19. if ( d == 1 )
  20. {
  21. Console.SetCursorPosition(6, 4);
  22. Console.Write("██");
  23. }
  24. if (d == 2)
  25. {
  26. Console.SetCursorPosition(1, 1);
  27. Console.Write("██");
  28. Console.SetCursorPosition(11, 7);
  29. Console.Write("██");
  30. }
  31. }
  32. }
  33. private static void init()
  34. {
  35. Console.Title = "Dobókocka";
  36. Console.CursorVisible = false;
  37. Console.SetWindowSize(15, 9);
  38. Console.SetBufferSize(15, 9);
  39. Console.WriteLine();
  40. Console.WriteLine(" ░░ ░░");
  41. Console.WriteLine();
  42. Console.WriteLine();
  43. Console.WriteLine(" ░░ ░░ ░░");
  44. Console.WriteLine();
  45. Console.WriteLine();
  46. Console.Write(" ░░ ░░");
  47. }
  48. }
  49. }
Descargar Printable view

URL of this paste

Embed with JavaScript

Embed with iframe

Raw text