Advertisement
NelIfandieva

Axe_v2

Jan 13th, 2020
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.67 KB | None | 0 0
  1. int width = scale * 5;
  2.  
  3.             //int height = 0;
  4.  
  5.             if (scale % 2 == 0)
  6.             {
  7.                 height = scale * 2;
  8.             }
  9.             else
  10.             {
  11.                 height = scale * 2 - 1;
  12.             }
  13.  
  14.             char backgroundHyphen = '-';
  15.             int backgroundHyphensStartNum = scale * 3;
  16.             int backroundHyphenEndNum = scale * 2 - 2;
  17.             char axeSymbol = '*';
  18.             int axeSymbolNum = 1;
  19.             int innerHyphenNum = 0;
  20.  
  21.             for (int i = 1; i <= scale; i++)
  22.             {
  23.                 Console.WriteLine("{0}{1}{2}{1}{3}", new string(backgroundHyphen, backgroundHyphensStartNum), new string(axeSymbol, axeSymbolNum), new string(backgroundHyphen, innerHyphenNum), new string(backgroundHyphen, backroundHyphenEndNum));
  24.                 innerHyphenNum++;
  25.                 backroundHyphenEndNum--;
  26.  
  27.             }
  28.  
  29.             int hadleLength = scale / 2;
  30.             char handleSymbol = '*';
  31.  
  32.             for (int i = 1; i <= hadleLength; i++)
  33.             {
  34.                 Console.WriteLine("{0}{1}{2}{1}{3}", new string(handleSymbol, backgroundHyphensStartNum), new string(axeSymbol, axeSymbolNum), new string(backgroundHyphen, innerHyphenNum), new string(backgroundHyphen, backroundHyphenEndNum));
  35.             }
  36.  
  37.             int lowerPartLength = scale / 2;
  38.  
  39.             for (int i = 1; i <= lowerPartLength; i++)
  40.             {
  41.                 if (i < lowerPartLength)
  42.                 {
  43.                     Console.WriteLine();
  44.                 }
  45.                 else if (i == lowerPartLength)
  46.                 {
  47.                     Console.WriteLine();
  48.                 }
  49.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement