SHARE
TWEET

Река

svetoslavhl Jan 9th, 2014 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static int[,] river =
  6.         {
  7.         {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  8.         {0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,0,1,1,1,1,1,1,0,0},
  9.         {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  10.         {0,0,0,0,1,1,0,0,0,0,1,1,1,0,0,1,1,1,1,1,0,0,0,1,1,0,0,1,1,1,1,0,1,1,0,0,1,1,0,0},
  11.         {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  12.         {0,0,1,1,1,1,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,1,1,1,0,0,0,1,1,0,0,1,1,1,1,1,1,1,0},
  13.         {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  14.         {1,1,1,1,1,1,0,0,0,0,1,1,1,0,0,1,1,1,1,1,0,0,0,1,1,0,0,1,1,1,1,0,1,1,0,0,1,1,0,0},
  15.         {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
  16.         };
  17.  
  18.     static int[] side = new int[river.GetLength(1)];
  19.  
  20.     static void IceColor()
  21.     {
  22.         Console.ForegroundColor = ConsoleColor.Cyan;
  23.         Console.BackgroundColor = ConsoleColor.Cyan;
  24.     }
  25.     static void WaterColor()
  26.     {
  27.         Console.ForegroundColor = ConsoleColor.DarkBlue;
  28.         Console.BackgroundColor = ConsoleColor.DarkBlue;
  29.     }
  30.  
  31.     static void SideColor()
  32.     {
  33.         Console.ForegroundColor = ConsoleColor.DarkGreen;
  34.         Console.BackgroundColor = ConsoleColor.DarkGreen;
  35.     }
  36.  
  37.     static void DrawRiver()
  38.     {
  39.         for (int row = 0; row < river.GetLength(0); row++)
  40.         {
  41.             for (int col = 0; col < river.GetLength(1); col++)
  42.             {
  43.                 if (river[row, col] == 1)
  44.                 {
  45.                     IceColor();
  46.                     Console.Write(river[row, col]);
  47.                 }
  48.                 else
  49.                 {
  50.                     WaterColor();
  51.                     Console.Write(river[row, col]);
  52.                 }
  53.  
  54.             }
  55.             Console.WriteLine();
  56.         }
  57.     }
  58.  
  59.     static void DrawSide()
  60.     {
  61.         for (int col = 0; col < side.Length; col++)
  62.         {
  63.             SideColor();
  64.             Console.Write(side[col]);
  65.         }
  66.         Console.WriteLine();
  67.     }
  68.  
  69.     static void Main()
  70.     {
  71.  
  72.         DrawSide();
  73.         DrawRiver();
  74.         DrawSide();
  75.         Console.ResetColor();
  76.     }
  77. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top