Advertisement
MrVeiran

3d igra s sin kri

Mar 12th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 186.83 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.  
  8. namespace ConsoleApp17
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.            
  15.             Console.CursorVisible = false;
  16.             int x1, x2, x3, x4, x5, x6;
  17.             x1 = 1;
  18.             x2 = 1;
  19.             x3 = 1;
  20.             x4 = 1;
  21.             x5 = 1;
  22.             x6 = 1;
  23.            
  24.             char[,] map =
  25.                 {
  26.                     {'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  27.                     {'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  28.                     {'#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ','#','#','#'},
  29.                     {'#','#','#','#','#',' ','#','#','#','#','#',' ','#','#','#'},
  30.                     {'#','#','#','#','#',' ','#','#','#','#','#',' ','#','#','#'},
  31.                     {'#','#','#',' ',' ',' ','#','#',' ',' ',' ',' ','#','#','#'},
  32.                     {'#','#','#',' ','#','#','#','#',' ','#','#','#','#','#','#'},
  33.                     {'#','#','#',' ','#','#','#','#',' ','#','#','#','#','#','#'},
  34.                     {'#','#','#',' ',' ',' ','#','#',' ',' ',' ',' ',' ','#','#'},
  35.                     {'#','#','#','#','#',' ','#','#',' ','#','#','#',' ','#','#'},
  36.                     {'#','#','#','#','#',' ','#','#',' ','#','#','#',' ','#','#'},
  37.                     {'#','#',' ',' ',' ',' ','#','#',' ','#','#','#',' ','#','#'},
  38.                     {'#','#',' ','#','#','#','#','#',' ',' ','#','#',' ','#','#'},
  39.                     {'#','#',' ','#','#','#','#','#','#',' ','#','#',' ','#','#'},
  40.                     {'#','#',' ','#','#','#','#','#','#',' ','#','#',' ','#','#'},
  41.                     {'#','#',' ',' ',' ',' ',' ',' ',' ',' ','#','#',' ','#','#'},
  42.                     {'#','#','#','#','#','#','#','#','#','#','#','#',' ','#','#'},
  43.                     {'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  44.                     {'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'}
  45.                 };
  46.  
  47.             char[,] view13 =
  48.                 {
  49.                     { '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'},
  50.  
  51.                     { ' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' '},
  52.  
  53.                     { ' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' '},
  54.  
  55.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  56.  
  57.  
  58.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  59.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  60.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  61.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '},
  62.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  63.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  64.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  65.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  66.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  67.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  68.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  69.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  70.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '},
  71.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', '(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  72.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=', '=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  73.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=', '=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  74.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'}
  75.                 };
  76.             char[,] view12 =
  77.                 {
  78.                     { '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'},
  79.  
  80.                     { ' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' '},
  81.  
  82.                     { ' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' '},
  83.  
  84.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  85.  
  86.  
  87.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  88.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  89.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  90.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '},
  91.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  92.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  93.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  94.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  95.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  96.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  97.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  98.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  99.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '},
  100.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', '(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  101.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=', '=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  102.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=', '=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  103.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'}
  104.                 };
  105.             char[,] view11 =
  106.                 {
  107.                     { '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'},
  108.  
  109.                     { ' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' '},
  110.  
  111.                     { ' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' '},
  112.  
  113.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  114.  
  115.  
  116.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  117.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  118.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  119.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '},
  120.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  121.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  122.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  123.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  124.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  125.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','#',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  126.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','#','#','#','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  127.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ','#','#','#','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  128.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '},
  129.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', '(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  130.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=', '=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  131.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=', '=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  132.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'}
  133.                 };
  134.             char[,] view1 =
  135.                 {
  136.                     { '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'},
  137.  
  138.                     { ' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' '},
  139.  
  140.                     { ' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' '},
  141.  
  142.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  143.  
  144.  
  145.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  146.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  147.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  148.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '},
  149.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  150.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  151.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  152.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  153.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  154.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','|',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  155.  
  156.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  157.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  158.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '},
  159.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', '(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  160.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=', '=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  161.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=', '=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  162.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'}
  163.                 };
  164.             char[,] view3 =
  165.                 {
  166.                     { '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*'},
  167.                     { ' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' '},
  168.                     { ' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' '},
  169.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  170.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  171.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  172.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', '*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  173.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '},
  174.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  175.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  176.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  177.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','*','*','*','*','*','*','*','*','*','*','*',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  178.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  179.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  180.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  181.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  182.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', ' '},
  183.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ', '(','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  184.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=', '=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  185.                     { ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','(','=','=','=','=','=', '=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=','=',')',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
  186.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'}
  187.                 };
  188.             char[,] view2 =
  189.                 {
  190.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  191.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  192.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  193.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  194.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  195.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  196.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  197.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  198.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  199.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  200.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  201.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  202.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  203.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  204.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  205.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  206.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  207.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  208.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  209.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
  210.                     { '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#', '#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'}
  211.                 };
  212.             char[,] curA = view3; // нужно  если нажмем M чтобы вернуть. запоминает текущий экран
  213.             int width = Console.WindowWidth;
  214.             int userX = 16, userY = 12; // начальная координата 16 12(4)    2 6(7)      2 11 (5)   5 8 (6)
  215.             int naprav = 4; //начальное направление 4 это вверх, 5 влево, 6 вниз , 7 вправо
  216.             Console.SetCursorPosition(10,4);
  217.             Console.Write("Добро пожаловать в игру 3Д сбор самоцветов!");
  218.             Console.SetCursorPosition(10, 6);
  219.             Console.Write("Для продолжения нажимайте Enter пока не начнется игра");
  220.             Console.ReadLine();
  221.             Console.Clear();
  222.             Console.SetCursorPosition(10, 4);
  223.             Console.Write("В игре есть 5 клавиш действия.");
  224.             Console.SetCursorPosition(10, 6);
  225.             Console.Write("Движение осуществляется по клавише UP по направлению");
  226.             Console.SetCursorPosition(10, 7);
  227.             Console.Write("куда вы смотрите.");
  228.             Console.SetCursorPosition(10, 9);
  229.             Console.Write("Клавиши Right и Left поворачивают игрока на 90 градусов.");
  230.             Console.SetCursorPosition(10, 11);
  231.             Console.Write("На клавишу M вызывается карта, которая указывает куда вы");
  232.             Console.SetCursorPosition(10, 12);
  233.             Console.Write("повернулись где вы и где лежат самоцветы.");
  234.             Console.SetCursorPosition(10, 14);
  235.             Console.Write("Клавиша ESC выводит нас с экрана карты.");
  236.             Console.ReadLine();
  237.  
  238.             Console.Clear();
  239.             Console.SetCursorPosition(10, 4);
  240.             Console.Write("Сейчас вам будут продемонстрированы экраны для понимания");
  241.             Console.ReadLine();
  242.             Console.Clear();
  243.             Console.SetCursorPosition(0, 0);
  244.             for (int i = 0; i < view1.GetLength(0); i++)
  245.             {
  246.                 for (int j = 0; j < view1.GetLength(1)-1; j++)
  247.                 {
  248.                     Console.Write(view1[i, j]);
  249.                 }
  250.                 Console.WriteLine();
  251.  
  252.  
  253.  
  254.             }
  255.             Console.SetCursorPosition(1, 22);
  256.             Console.Write(" Это экран дальнего коридора без ответвлений");
  257.             Console.ReadLine();
  258.             Console.Clear();
  259.             Console.SetCursorPosition(0, 0);
  260.             for (int i = 0; i < view11.GetLength(0); i++)
  261.             {
  262.                 for (int j = 0; j < view11.GetLength(1) - 1; j++)
  263.                 {
  264.                     Console.Write(view11[i, j]);
  265.                 }
  266.                 Console.WriteLine();
  267.  
  268.  
  269.  
  270.             }
  271.             Console.SetCursorPosition(1, 22);
  272.             Console.Write(" Это экран показывает что налево будет есть проход. Справа его нет");
  273.             Console.ReadLine();
  274.             Console.Clear();
  275.             Console.SetCursorPosition(0, 0);
  276.             for (int i = 0; i < view12.GetLength(0); i++)
  277.             {
  278.                 for (int j = 0; j < view12.GetLength(1) - 1; j++)
  279.                 {
  280.                     Console.Write(view12[i, j]);
  281.                 }
  282.                 Console.WriteLine();
  283.  
  284.  
  285.  
  286.             }
  287.             Console.SetCursorPosition(1, 22);
  288.             Console.Write(" Это экран показывает что направо будет есть проход. Слева его нет");
  289.             Console.ReadLine();
  290.             Console.Clear();
  291.             Console.SetCursorPosition(0, 0);
  292.             for (int i = 0; i < view13.GetLength(0); i++)
  293.             {
  294.                 for (int j = 0; j < view13.GetLength(1) - 1; j++)
  295.                 {
  296.                     Console.Write(view13[i, j]);
  297.                 }
  298.                 Console.WriteLine();
  299.  
  300.  
  301.  
  302.             }
  303.             Console.SetCursorPosition(1, 22);
  304.             Console.Write(" Это экран показывает что направо  и налево есть проход");
  305.             Console.ReadLine();
  306.             Console.Clear();
  307.             Console.SetCursorPosition(0, 0);
  308.             for (int i = 0; i < view2.GetLength(0); i++)
  309.             {
  310.                 for (int j = 0; j < view2.GetLength(1) - 1; j++)
  311.                 {
  312.                     Console.Write(view2[i, j]);
  313.                 }
  314.                 Console.WriteLine();
  315.  
  316.  
  317.  
  318.             }
  319.             Console.SetCursorPosition(1, 22);
  320.             Console.Write(" Это экран когда пользователь уперся лицом в стенку");
  321.             Console.ReadLine();
  322.             Console.Clear();
  323.             Console.SetCursorPosition(0, 0);
  324.             for (int i = 0; i < view3.GetLength(0); i++)
  325.             {
  326.                 for (int j = 0; j < view3.GetLength(1) - 1; j++)
  327.                 {
  328.                     Console.Write(view3[i, j]);
  329.                 }
  330.                 Console.WriteLine();
  331.  
  332.  
  333.  
  334.             }
  335.             Console.SetCursorPosition(1, 22);
  336.             Console.Write(" Это экран демонстрирует длинный коридор ");
  337.             Console.SetCursorPosition(1, 23);
  338.             Console.Write(" где не видно дальнейших ответвлений или тупика");
  339.             Console.ReadLine();
  340.             Console.Clear();
  341.             Console.SetCursorPosition(0, 0);
  342.             for (int i = 0; i < map.GetLength(0); i++)
  343.             {
  344.                 for (int j = 0; j < map.GetLength(1) - 1; j++)
  345.                 {
  346.                     Console.Write(map[i, j]);
  347.                 }
  348.                 Console.WriteLine();
  349.  
  350.  
  351.  
  352.             }
  353.             Console.SetCursorPosition(1, 22);
  354.             Console.Write("Это карта");
  355.             Console.ReadLine();
  356.             Console.SetCursorPosition(12, 16);
  357.             Console.Write("@");
  358.             Console.SetCursorPosition(15, 16);
  359.             Console.Write("◄==========");
  360.             Console.SetCursorPosition(1, 22);
  361.             Console.Write("А тут вы начинаете где символ @.");
  362.             Console.SetCursorPosition(1, 23);
  363.             Console.Write("Ваша иконка иконка будет отображаться стрелочкой");
  364.             Console.ReadLine();
  365.             Console.SetCursorPosition(1, 23);
  366.             Console.Write("                                                        ");
  367.             Console.SetCursorPosition(21, 10);
  368.             Console.Write("▲");
  369.             Console.SetCursorPosition(20, 11);
  370.             Console.Write("| |");
  371.             Console.SetCursorPosition(20, 12);
  372.             Console.Write("| |");
  373.             Console.SetCursorPosition(15, 16);
  374.             Console.Write("                          ");
  375.             Console.SetCursorPosition(1, 22);
  376.             Console.Write("Направление первоначального движения будет ▲");
  377.             Console.ReadLine();
  378.  
  379.  
  380.  
  381.             Console.Clear();
  382.             Console.SetCursorPosition(10, 4);
  383.             Console.Write("Вы готовы к игре?");
  384.             Console.SetCursorPosition(10, 6);
  385.             Console.Write("нажмите Enter");
  386.             Console.ReadLine();
  387.  
  388.             Console.BackgroundColor = ConsoleColor.White;
  389.             Console.ForegroundColor = ConsoleColor.Black;
  390.             for (int i = 0; i < width - 2; i++)
  391.             {
  392.                 for (int j = 0; j < 4; j++)
  393.                 {
  394.                     Console.SetCursorPosition(i, j + 21);
  395.                     Console.Write(" ");
  396.                 }
  397.             }
  398.             Console.SetCursorPosition(0, 0); // вывод массива
  399.  
  400.  
  401.             for (int i = 0; i < view3.GetLength(0); i++) ////начальный 3 экран
  402.             {
  403.                 for (int j = 0; j < view3.GetLength(1) - 1; j++)
  404.                 {
  405.                     Console.Write(view3[i, j]);
  406.                 }
  407.                 Console.WriteLine();
  408.             }
  409.  
  410.             int perna = 0;
  411.             char[] bag = new char[0]; //создание инвертаря
  412.  
  413.             while (true)
  414.             {
  415.                 for (int i = 0; i < 4; i++) // начало рисование инвертаря
  416.                 {
  417.                     Console.SetCursorPosition(0, 21 + i);
  418.  
  419.                     Console.Write("#");
  420.                     Console.SetCursorPosition(width - 2, 21 + i);
  421.                     Console.Write("#");
  422.                 }
  423.                 for (int i = 0; i < 4; i++)
  424.                 {
  425.                     Console.SetCursorPosition(0, 21 + i);
  426.                     Console.Write("#");
  427.                 }
  428.                 for (int i = 0; i < width - 1; i++)
  429.                 {
  430.                     Console.SetCursorPosition(i, 24);
  431.                     Console.Write("#");
  432.                 }
  433.                 for (int i = 0; i < width - 2; i++) // конец
  434.                 {
  435.                     Console.SetCursorPosition(i, 20);
  436.  
  437.                     Console.Write("#");
  438.  
  439.  
  440.                 }
  441.  
  442.                 Console.SetCursorPosition(1, 22);
  443.                 Console.Write(" Сумка: ");
  444.                 if (x1 == 0)
  445.                 {
  446.                     Console.ForegroundColor = ConsoleColor.Blue;
  447.                     Console.SetCursorPosition(10, 21);
  448.                     Console.Write("___");
  449.                     Console.SetCursorPosition(9, 22);
  450.                     Console.Write("(___)");
  451.  
  452.                     Console.ForegroundColor = ConsoleColor.Black ;
  453.  
  454.                 }
  455.                 if (x2 == 0)
  456.                 {
  457.                     Console.ForegroundColor = ConsoleColor.Blue;
  458.                     Console.SetCursorPosition(17, 21);
  459.                     Console.Write("___");
  460.                     Console.SetCursorPosition(16, 22);
  461.                     Console.Write("(___)");
  462.  
  463.                     Console.ForegroundColor = ConsoleColor.Black;
  464.  
  465.                 }
  466.                 if (x3 == 0)
  467.                 {
  468.                     Console.ForegroundColor = ConsoleColor.Blue;
  469.                     Console.SetCursorPosition(24, 21);
  470.                     Console.Write("___");
  471.                     Console.SetCursorPosition(23, 22);
  472.                     Console.Write("(___)");
  473.  
  474.                     Console.ForegroundColor = ConsoleColor.Black;
  475.  
  476.                 }
  477.                 if (x4 == 0)
  478.                 {
  479.                     Console.ForegroundColor = ConsoleColor.Blue;
  480.                     Console.SetCursorPosition(31, 21);
  481.                     Console.Write("___");
  482.                     Console.SetCursorPosition(30, 22);
  483.                     Console.Write("(___)");
  484.  
  485.                     Console.ForegroundColor = ConsoleColor.Black;
  486.  
  487.                 }
  488.                 if (x5 == 0)
  489.                 {
  490.                     Console.ForegroundColor = ConsoleColor.Blue;
  491.                     Console.SetCursorPosition(38, 21);
  492.                     Console.Write("___");
  493.                     Console.SetCursorPosition(37, 22);
  494.                     Console.Write("(___)");
  495.  
  496.                     Console.ForegroundColor = ConsoleColor.Black;
  497.  
  498.                 }
  499.                 if (x6 == 0)
  500.                 {
  501.                     Console.ForegroundColor = ConsoleColor.Blue;
  502.                     Console.SetCursorPosition(45, 21);
  503.                     Console.Write("___");
  504.                     Console.SetCursorPosition(44, 22);
  505.                     Console.Write("(___)");
  506.  
  507.                     Console.ForegroundColor = ConsoleColor.Black;
  508.  
  509.                 }
  510.                 if (x6 == 0 && x2 == 0 && x3 == 0 && x4 == 0 && x5 == 0 && x6 == 0)
  511.                 {
  512.                    
  513.                     Console.SetCursorPosition(52, 21);
  514.                     Console.Write("Вы всё собрали!");
  515.                     Console.SetCursorPosition(52, 22);
  516.                     Console.Write("Возвращайтесь обратно!");
  517.  
  518.  
  519.  
  520.                 }
  521.  
  522.  
  523.  
  524.                 for (int i = 0; i < bag.Length; i++)
  525.                     Console.Write(bag[i] + " | ");
  526.  
  527.  
  528.  
  529.  
  530.  
  531.                 ConsoleKeyInfo charKey = Console.ReadKey();
  532.  
  533.  
  534.  
  535.  
  536.  
  537.                 switch (charKey.Key)
  538.                 {
  539.                     case ConsoleKey.M:
  540.                         Console.Clear();
  541.                         for (int i = 0; i < map.GetLength(0); i++)
  542.                         {
  543.                             for (int j = 0; j < map.GetLength(1); j++)
  544.                             {
  545.                                 Console.Write(map[i, j]);
  546.                             }
  547.                             Console.WriteLine();
  548.  
  549.  
  550.  
  551.                         }
  552.                         if (x1 == 0)
  553.                         {
  554.                             Console.SetCursorPosition(11, 2);
  555.                             Console.Write("o");
  556.                         }
  557.                         if (x1==1)
  558.                         {
  559.                             Console.SetCursorPosition(11, 2);
  560.                             Console.Write("X");
  561.                         }
  562.                         if (x2 == 0)
  563.                         {
  564.                             Console.SetCursorPosition(5, 2);
  565.                             Console.Write("o");
  566.                         }
  567.                         if (x2==1)
  568.                         {
  569.                             Console.SetCursorPosition(5, 2);
  570.                             Console.Write("X");
  571.                         }
  572.                         if (x3 == 0)
  573.                         {
  574.                             Console.SetCursorPosition(3, 5);
  575.                             Console.Write("o");
  576.                         }
  577.                         if (x3 == 1)
  578.                         {
  579.                             Console.SetCursorPosition(3, 5);
  580.                             Console.Write("X");
  581.                         }
  582.                         if (x4 == 0)
  583.                         {
  584.                             Console.SetCursorPosition(5, 11);
  585.                             Console.Write("o");
  586.                         }
  587.                         if (x4 == 1)
  588.                         {
  589.                             Console.SetCursorPosition(5, 11);
  590.                             Console.Write("X");
  591.                         }
  592.                         if (x5 == 0)
  593.                         {
  594.                             Console.SetCursorPosition(2, 15);
  595.                             Console.Write("o");
  596.                         }
  597.                         if (x5 == 1)
  598.                         {
  599.                             Console.SetCursorPosition(2, 15);
  600.                             Console.Write("X");
  601.                         }
  602.                         if (x6 == 0)
  603.                         {
  604.                             Console.SetCursorPosition(9, 15);
  605.                             Console.Write("o");
  606.                         }
  607.                         if (x6 == 1)
  608.                         {
  609.                             Console.SetCursorPosition(9, 15);
  610.                             Console.Write("X");
  611.                         }
  612.  
  613.  
  614.  
  615.  
  616.                         perna = 1;
  617.                         Console.SetCursorPosition(30, 5);
  618.                         Console.Write("НАПРАВЛЕНИЕ ДВИЖЕНИЯ");
  619.  
  620.                         Console.SetCursorPosition(40, 7);
  621.                         if (naprav == 4)
  622.                             Console.Write("▲");
  623.                         if (naprav == 5)
  624.                             Console.Write("◄==");
  625.                         if (naprav == 6)
  626.                             Console.Write("▼");
  627.  
  628.  
  629.                         if (naprav == 7)
  630.                             Console.Write("==►");
  631.  
  632.  
  633.  
  634.                         Console.SetCursorPosition(userY, userX);
  635.                         if (naprav == 4)
  636.                         Console.Write('▲');
  637.                         if (naprav == 5)
  638.                             Console.Write('◄');
  639.                         if (naprav == 6)
  640.                             Console.Write('▼');
  641.                         if (naprav == 7)
  642.                             Console.Write('►');
  643.                         for (int i = 0; i < 4; i++)
  644.                         {
  645.                             Console.SetCursorPosition(0, 21 + i);
  646.  
  647.                             Console.Write("#");
  648.                             Console.SetCursorPosition(width - 2, 21 + i);
  649.                             Console.Write("#");
  650.                         }
  651.                         Console.SetCursorPosition(width - 2, 20);
  652.                         Console.Write("#");
  653.  
  654.                         break;
  655.  
  656.  
  657.  
  658.  
  659.  
  660.                 }
  661.                 //case ConsoleKey.LeftArrow:
  662.                 //        naprav++;
  663.                 //break;
  664.                 //    case ConsoleKey.RightArrow:
  665.                 //        naprav--;
  666.                 if (naprav == 3)
  667.                 {
  668.                     naprav = 7;
  669.                 }
  670.  
  671.                 if (naprav == 8)
  672.                 {
  673.                     naprav = 4;
  674.                 }
  675.  
  676.                 if (charKey.Key == ConsoleKey.LeftArrow)
  677.                 {
  678.                     naprav++;
  679.                     if (naprav == 3)
  680.                     {
  681.                         naprav = 7;
  682.                     }
  683.  
  684.                     if (naprav == 8)
  685.                     {
  686.                         naprav = 4;
  687.                     }
  688.                     if (naprav == 7) // проверяет направление НАВЕРХ userx -1
  689.                     {
  690.                         if (map[userX, userY + 1] != '#')
  691.                         {
  692.  
  693.  
  694.                             if (map[userX, userY + 2] == '#' && map[userX - 1, userY + 1] == '#' && map[userX + 1, userY + 1] == '#') // проверка буквы г на тупик 2
  695.                             {
  696.                                 Console.Clear();
  697.                                 for (int i = 0; i < view1.GetLength(0); i++)
  698.                                 {
  699.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  700.                                     {
  701.                                         Console.Write(view1[i, j]);
  702.                                     }
  703.                                     Console.WriteLine();
  704.  
  705.                                 }
  706.                                 curA = view1;
  707.                             }
  708.                            
  709.  
  710.                             //отлично
  711.                             if (map[userX, userY + 1] == ' ' && map[userX, userY + 2] == ' ')  //проверяет два следующий блока
  712.                             {
  713.                                 Console.Clear();
  714.                                 for (int i = 0; i < view3.GetLength(0); i++)
  715.                                 {
  716.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  717.                                     {
  718.                                         Console.Write(view3[i, j]);
  719.                                     }
  720.                                     Console.WriteLine();
  721.                                 }
  722.                                 curA = view3;
  723.  
  724.                             }
  725.                             if (map[userX, userY + 1] == ' ')
  726.                             {
  727.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик1
  728.                                 {
  729.  
  730.                                     Console.Clear();
  731.                                     for (int i = 0; i < view11.GetLength(0); i++)
  732.                                     {
  733.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  734.                                         {
  735.                                             Console.Write(view11[i, j]);
  736.                                         }
  737.                                         Console.WriteLine();
  738.  
  739.                                     }
  740.                                     curA = view11;
  741.  
  742.  
  743.                                 }
  744.                                 if (map[userX + 1, userY + 1] == ' ') // проверка буквы г на тупик2
  745.                                 {
  746.  
  747.                                     Console.Clear();
  748.                                     for (int i = 0; i < view12.GetLength(0); i++)
  749.                                     {
  750.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  751.                                         {
  752.                                             Console.Write(view12[i, j]);
  753.                                         }
  754.                                         Console.WriteLine();
  755.  
  756.                                     }
  757.                                     curA = view12;
  758.  
  759.  
  760.                                 }
  761.  
  762.  
  763.                             }
  764.                             if (map[userX, userY + 2] == '#' && map[userX + 1, userY + 1] == '#') // проверка буквы г на тупик1
  765.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик1
  766.                                 {
  767.  
  768.                                     Console.Clear();
  769.                                     for (int i = 0; i < view11.GetLength(0); i++)
  770.                                     {
  771.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  772.                                         {
  773.                                             Console.Write(view11[i, j]);
  774.                                         }
  775.                                         Console.WriteLine();
  776.  
  777.                                     }
  778.                                     curA = view11;
  779.  
  780.  
  781.                                 }
  782.                             if (map[userX + 1, userY + 1] == ' ') // проверка буквы г на тупик2
  783.                             {
  784.  
  785.                                 Console.Clear();
  786.                                 for (int i = 0; i < view12.GetLength(0); i++)
  787.                                 {
  788.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  789.                                     {
  790.                                         Console.Write(view12[i, j]);
  791.                                     }
  792.                                     Console.WriteLine();
  793.  
  794.                                 }
  795.                                 curA = view12;
  796.  
  797.  
  798.                             }
  799.                             if (map[userX + 1, userY + 1] == ' ' && map[userX - 1, userY + 1] == ' ') // проверка буквы Г туда и обратно)
  800.                             {
  801.                                 Console.Clear();
  802.                                 for (int i = 0; i < view13.GetLength(0); i++)
  803.                                 {
  804.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  805.                                     {
  806.                                         Console.Write(view13[i, j]);
  807.                                     }
  808.                                     Console.WriteLine();
  809.  
  810.                                 }
  811.                                 curA = view13;
  812.                             }
  813.  
  814.                         }
  815.                         if (map[userX, userY + 1] == '#')
  816.                         {
  817.                             Console.Clear();
  818.                             for (int i = 0; i < view2.GetLength(0); i++)
  819.                             {
  820.                                 for (int j = 0; j < view2.GetLength(1) - 1; j++)
  821.                                 {
  822.                                     Console.Write(view2[i, j]);
  823.                                 }
  824.                                 Console.WriteLine();
  825.                             }
  826.                             curA = view2;
  827.                         }
  828.                         if (userX == 2 && userY + 1 == 11 && x1 == 1)
  829.                         {
  830.                             Console.SetCursorPosition(35, 15);
  831.                             Console.BackgroundColor = ConsoleColor.Blue;
  832.                             Console.Write("####");
  833.                             Console.SetCursorPosition(35, 16);
  834.                             Console.Write("####");
  835.                             Console.SetCursorPosition(35, 17);
  836.                             Console.Write("####");
  837.                             Console.BackgroundColor = ConsoleColor.White;
  838.  
  839.                         }
  840.                         if (userX == 2 && userY + 1 == 5 && x2 == 1)
  841.                         {
  842.                             Console.SetCursorPosition(35, 15);
  843.                             Console.BackgroundColor = ConsoleColor.Blue;
  844.                             Console.Write("####");
  845.                             Console.SetCursorPosition(35, 16);
  846.                             Console.Write("####");
  847.                             Console.SetCursorPosition(35, 17);
  848.                             Console.Write("####");
  849.                             Console.BackgroundColor = ConsoleColor.White;
  850.  
  851.                         }
  852.                         if (userX == 5 && userY + 1 == 3 && x3 == 1)
  853.                         {
  854.                             Console.SetCursorPosition(35, 15);
  855.                             Console.BackgroundColor = ConsoleColor.Blue;
  856.                             Console.Write("####");
  857.                             Console.SetCursorPosition(35, 16);
  858.                             Console.Write("####");
  859.                             Console.SetCursorPosition(35, 17);
  860.                             Console.Write("####");
  861.                             Console.BackgroundColor = ConsoleColor.White;
  862.  
  863.                         }
  864.                         if (userX == 11 && userY + 1 == 5 && x4 == 1)
  865.                         {
  866.                             Console.SetCursorPosition(35, 15);
  867.                             Console.BackgroundColor = ConsoleColor.Blue;
  868.                             Console.Write("####");
  869.                             Console.SetCursorPosition(35, 16);
  870.                             Console.Write("####");
  871.                             Console.SetCursorPosition(35, 17);
  872.                             Console.Write("####");
  873.                             Console.BackgroundColor = ConsoleColor.White;
  874.  
  875.                         }
  876.                         if (userX == 15 && userY + 1 == 2 && x5 == 1)
  877.                         {
  878.                             Console.SetCursorPosition(35, 15);
  879.                             Console.BackgroundColor = ConsoleColor.Blue;
  880.                             Console.Write("####");
  881.                             Console.SetCursorPosition(35, 16);
  882.                             Console.Write("####");
  883.                             Console.SetCursorPosition(35, 17);
  884.                             Console.Write("####");
  885.                             Console.BackgroundColor = ConsoleColor.White;
  886.  
  887.                         }
  888.                         if (userX == 15 && userY + 1 == 9 && x6 == 1)
  889.                         {
  890.                             Console.SetCursorPosition(35, 15);
  891.                             Console.BackgroundColor = ConsoleColor.Blue;
  892.                             Console.Write("####");
  893.                             Console.SetCursorPosition(35, 16);
  894.                             Console.Write("####");
  895.                             Console.SetCursorPosition(35, 17);
  896.                             Console.Write("####");
  897.                             Console.BackgroundColor = ConsoleColor.White;
  898.  
  899.                         }
  900.  
  901.                     }
  902.                     if (naprav == 4) // проверяет направление НАВЕРХ userx -1
  903.                     {
  904.                         if (map[userX - 1, userY] != '#')
  905.                         {
  906.  
  907.  
  908.                             if (map[userX - 2, userY] == '#' && map[userX - 1, userY - 1] == '#' && map[userX - 1, userY + 1] == '#') // проверка буквы г на тупик 2
  909.                             {
  910.                                 Console.Clear();
  911.                                 for (int i = 0; i < view1.GetLength(0); i++)
  912.                                 {
  913.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  914.                                     {
  915.                                         Console.Write(view1[i, j]);
  916.                                     }
  917.                                     Console.WriteLine();
  918.  
  919.                                 }
  920.                                 curA = view1;
  921.                             }
  922.                            
  923.  
  924.                             //отлично
  925.                             if (map[userX - 1, userY] == ' ' && map[userX - 2, userY] == ' ')  //проверяет два следующий блока
  926.                             {
  927.                                 Console.Clear();
  928.                                 for (int i = 0; i < view3.GetLength(0); i++)
  929.                                 {
  930.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  931.                                     {
  932.                                         Console.Write(view3[i, j]);
  933.                                     }
  934.                                     Console.WriteLine();
  935.                                 }
  936.                                 curA = view3;
  937.  
  938.                             }
  939.                             if (map[userX - 1, userY] == ' ')
  940.                             {
  941.                                 if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик1
  942.                                 {
  943.  
  944.                                     Console.Clear();
  945.                                     for (int i = 0; i < view11.GetLength(0); i++)
  946.                                     {
  947.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  948.                                         {
  949.                                             Console.Write(view11[i, j]);
  950.                                         }
  951.                                         Console.WriteLine();
  952.  
  953.                                     }
  954.                                     curA = view11;
  955.  
  956.  
  957.                                 }
  958.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик2
  959.                                 {
  960.  
  961.                                     Console.Clear();
  962.                                     for (int i = 0; i < view12.GetLength(0); i++)
  963.                                     {
  964.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  965.                                         {
  966.                                             Console.Write(view12[i, j]);
  967.                                         }
  968.                                         Console.WriteLine();
  969.  
  970.                                     }
  971.                                     curA = view12;
  972.  
  973.  
  974.                                 }
  975.  
  976.  
  977.                             }
  978.                             if (map[userX - 2, userY] == '#' && map[userX - 1, userY - 1] == '#') // проверка буквы г на тупик1
  979.                                 if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик1
  980.                                 {
  981.  
  982.                                     Console.Clear();
  983.                                     for (int i = 0; i < view11.GetLength(0); i++)
  984.                                     {
  985.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  986.                                         {
  987.                                             Console.Write(view11[i, j]);
  988.                                         }
  989.                                         Console.WriteLine();
  990.  
  991.                                     }
  992.                                     curA = view11;
  993.  
  994.  
  995.                                 }
  996.                             if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик2
  997.                             {
  998.  
  999.                                 Console.Clear();
  1000.                                 for (int i = 0; i < view12.GetLength(0); i++)
  1001.                                 {
  1002.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  1003.                                     {
  1004.                                         Console.Write(view12[i, j]);
  1005.                                     }
  1006.                                     Console.WriteLine();
  1007.  
  1008.                                 }
  1009.                                 curA = view12;
  1010.  
  1011.  
  1012.                             }
  1013.                             if (map[userX - 1, userY - 1] == ' ' && map[userX - 1, userY + 1] == ' ') // проверка буквы Г туда и обратно)
  1014.                             {
  1015.                                 Console.Clear();
  1016.                                 for (int i = 0; i < view13.GetLength(0); i++)
  1017.                                 {
  1018.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  1019.                                     {
  1020.                                         Console.Write(view13[i, j]);
  1021.                                     }
  1022.                                     Console.WriteLine();
  1023.  
  1024.                                 }
  1025.                                 curA = view13;
  1026.                             }
  1027.  
  1028.                         }
  1029.                         if (map[userX - 1, userY] == '#')
  1030.                         {
  1031.                             Console.Clear();
  1032.                             for (int i = 0; i < view2.GetLength(0); i++)
  1033.                             {
  1034.                                 for (int j = 0; j < view2.GetLength(1) - 1; j++)
  1035.                                 {
  1036.                                     Console.Write(view2[i, j]);
  1037.                                 }
  1038.                                 Console.WriteLine();
  1039.                             }
  1040.                             curA = view2;
  1041.                         }
  1042.                         if (userX - 1 == 2 && userY == 11 && x1 == 1)
  1043.                         {
  1044.                             Console.SetCursorPosition(35, 15);
  1045.                             Console.BackgroundColor = ConsoleColor.Blue;
  1046.                             Console.Write("####");
  1047.                             Console.SetCursorPosition(35, 16);
  1048.                             Console.Write("####");
  1049.                             Console.SetCursorPosition(35, 17);
  1050.                             Console.Write("####");
  1051.                             Console.BackgroundColor = ConsoleColor.White;
  1052.  
  1053.                         }
  1054.                         if (userX - 1 == 2 && userY == 5 && x2 == 1)
  1055.                         {
  1056.                             Console.SetCursorPosition(35, 15);
  1057.                             Console.BackgroundColor = ConsoleColor.Blue;
  1058.                             Console.Write("####");
  1059.                             Console.SetCursorPosition(35, 16);
  1060.                             Console.Write("####");
  1061.                             Console.SetCursorPosition(35, 17);
  1062.                             Console.Write("####");
  1063.                             Console.BackgroundColor = ConsoleColor.White;
  1064.  
  1065.                         }
  1066.                         if (userX - 1 == 5 && userY == 3 && x3 == 1)
  1067.                         {
  1068.                             Console.SetCursorPosition(35, 15);
  1069.                             Console.BackgroundColor = ConsoleColor.Blue;
  1070.                             Console.Write("####");
  1071.                             Console.SetCursorPosition(35, 16);
  1072.                             Console.Write("####");
  1073.                             Console.SetCursorPosition(35, 17);
  1074.                             Console.Write("####");
  1075.                             Console.BackgroundColor = ConsoleColor.White;
  1076.  
  1077.                         }
  1078.                         if (userX - 1 == 11 && userY == 5 && x4 == 1)
  1079.                         {
  1080.                             Console.SetCursorPosition(35, 15);
  1081.                             Console.BackgroundColor = ConsoleColor.Blue;
  1082.                             Console.Write("####");
  1083.                             Console.SetCursorPosition(35, 16);
  1084.                             Console.Write("####");
  1085.                             Console.SetCursorPosition(35, 17);
  1086.                             Console.Write("####");
  1087.                             Console.BackgroundColor = ConsoleColor.White;
  1088.  
  1089.                         }
  1090.                         if (userX - 1 == 15 && userY == 2 && x5 == 1)
  1091.                         {
  1092.                             Console.SetCursorPosition(35, 15);
  1093.                             Console.BackgroundColor = ConsoleColor.Blue;
  1094.                             Console.Write("####");
  1095.                             Console.SetCursorPosition(35, 16);
  1096.                             Console.Write("####");
  1097.                             Console.SetCursorPosition(35, 17);
  1098.                             Console.Write("####");
  1099.                             Console.BackgroundColor = ConsoleColor.White;
  1100.  
  1101.                         }
  1102.                         if (userX - 1 == 15 && userY == 9 && x6 == 1)
  1103.                         {
  1104.                             Console.SetCursorPosition(35, 15);
  1105.                             Console.BackgroundColor = ConsoleColor.Blue;
  1106.                             Console.Write("####");
  1107.                             Console.SetCursorPosition(35, 16);
  1108.                             Console.Write("####");
  1109.                             Console.SetCursorPosition(35, 17);
  1110.                             Console.Write("####");
  1111.                             Console.BackgroundColor = ConsoleColor.White;
  1112.  
  1113.                         }
  1114.  
  1115.                     }
  1116.                     if (naprav == 5)
  1117.                     {
  1118.                         if (map[userX, userY - 1] != '#')
  1119.                         {
  1120.  
  1121.  
  1122.                             if (map[userX, userY - 2] == '#' && map[userX - 1, userY - 1] == '#' && map[userX + 1, userY - 1] == '#') // проверка буквы г на тупик 2
  1123.                             {
  1124.                                 Console.Clear();
  1125.                                 for (int i = 0; i < view1.GetLength(0); i++)
  1126.                                 {
  1127.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  1128.                                     {
  1129.                                         Console.Write(view1[i, j]);
  1130.                                     }
  1131.                                     Console.WriteLine();
  1132.  
  1133.                                 }
  1134.                                 curA = view1;
  1135.                             }
  1136.                            
  1137.  
  1138.                             //отлично
  1139.                             if (map[userX, userY - 1] == ' ' && map[userX, userY - 2] == ' ')  //проверяет два следующий блока
  1140.                             {
  1141.                                 Console.Clear();
  1142.                                 for (int i = 0; i < view3.GetLength(0); i++)
  1143.                                 {
  1144.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  1145.                                     {
  1146.                                         Console.Write(view3[i, j]);
  1147.                                     }
  1148.                                     Console.WriteLine();
  1149.                                 }
  1150.                                 curA = view3;
  1151.  
  1152.                             }
  1153.                             if (map[userX, userY - 1] == ' ')
  1154.                             {
  1155.                                 if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик1
  1156.                                 {
  1157.  
  1158.                                     Console.Clear();
  1159.                                     for (int i = 0; i < view11.GetLength(0); i++)
  1160.                                     {
  1161.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  1162.                                         {
  1163.                                             Console.Write(view11[i, j]);
  1164.                                         }
  1165.                                         Console.WriteLine();
  1166.  
  1167.                                     }
  1168.                                     curA = view11;
  1169.  
  1170.  
  1171.                                 }
  1172.                                 if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик2
  1173.                                 {
  1174.  
  1175.                                     Console.Clear();
  1176.                                     for (int i = 0; i < view12.GetLength(0); i++)
  1177.                                     {
  1178.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  1179.                                         {
  1180.                                             Console.Write(view12[i, j]);
  1181.                                         }
  1182.                                         Console.WriteLine();
  1183.  
  1184.                                     }
  1185.                                     curA = view12;
  1186.  
  1187.  
  1188.                                 }
  1189.  
  1190.  
  1191.                             }
  1192.                             if (map[userX, userY - 2] == '#' && map[userX - 1, userY - 1] == '#') // проверка буквы г на тупик1
  1193.                                 if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик1
  1194.                                 {
  1195.  
  1196.                                     Console.Clear();
  1197.                                     for (int i = 0; i < view11.GetLength(0); i++)
  1198.                                     {
  1199.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  1200.                                         {
  1201.                                             Console.Write(view11[i, j]);
  1202.                                         }
  1203.                                         Console.WriteLine();
  1204.  
  1205.                                     }
  1206.                                     curA = view11;
  1207.  
  1208.  
  1209.                                 }
  1210.  
  1211.  
  1212.                             if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик2
  1213.                             {
  1214.  
  1215.                                 Console.Clear();
  1216.                                 for (int i = 0; i < view12.GetLength(0); i++)
  1217.                                 {
  1218.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  1219.                                     {
  1220.                                         Console.Write(view12[i, j]);
  1221.                                     }
  1222.                                     Console.WriteLine();
  1223.  
  1224.                                 }
  1225.                                 curA = view12;
  1226.  
  1227.  
  1228.                             }
  1229.                             if (map[userX - 1, userY - 1] == ' ' && map[userX + 1, userY - 1] == ' ') // проверка буквы Г туда и обратно)
  1230.                             {
  1231.                                 Console.Clear();
  1232.                                 for (int i = 0; i < view13.GetLength(0); i++)
  1233.                                 {
  1234.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  1235.                                     {
  1236.                                         Console.Write(view13[i, j]);
  1237.                                     }
  1238.                                     Console.WriteLine();
  1239.  
  1240.                                 }
  1241.                                 curA = view13;
  1242.                             }
  1243.  
  1244.  
  1245.                         }
  1246.                         if (map[userX, userY - 1] == '#')
  1247.                         {
  1248.                             Console.Clear();
  1249.                             for (int i = 0; i < view2.GetLength(0); i++)
  1250.                             {
  1251.                                 for (int j = 0; j < view2.GetLength(1) - 1; j++)
  1252.                                 {
  1253.                                     Console.Write(view2[i, j]);
  1254.                                 }
  1255.                                 Console.WriteLine();
  1256.                             }
  1257.                             curA = view2;
  1258.                         }
  1259.                         if (userX == 2 && userY - 1 == 11 && x1 == 1)
  1260.                         {
  1261.                             Console.SetCursorPosition(35, 15);
  1262.                             Console.BackgroundColor = ConsoleColor.Blue;
  1263.                             Console.Write("####");
  1264.                             Console.SetCursorPosition(35, 16);
  1265.                             Console.Write("####");
  1266.                             Console.SetCursorPosition(35, 17);
  1267.                             Console.Write("####");
  1268.                             Console.BackgroundColor = ConsoleColor.White;
  1269.  
  1270.                         }
  1271.                         if (userX == 2 && userY - 1 == 5 && x2 == 1)
  1272.                         {
  1273.                             Console.SetCursorPosition(35, 15);
  1274.                             Console.BackgroundColor = ConsoleColor.Blue;
  1275.                             Console.Write("####");
  1276.                             Console.SetCursorPosition(35, 16);
  1277.                             Console.Write("####");
  1278.                             Console.SetCursorPosition(35, 17);
  1279.                             Console.Write("####");
  1280.                             Console.BackgroundColor = ConsoleColor.White;
  1281.  
  1282.                         }
  1283.                         if (userX == 5 && userY - 1 == 3 && x3 == 1)
  1284.                         {
  1285.                             Console.SetCursorPosition(35, 15);
  1286.                             Console.BackgroundColor = ConsoleColor.Blue;
  1287.                             Console.Write("####");
  1288.                             Console.SetCursorPosition(35, 16);
  1289.                             Console.Write("####");
  1290.                             Console.SetCursorPosition(35, 17);
  1291.                             Console.Write("####");
  1292.                             Console.BackgroundColor = ConsoleColor.White;
  1293.  
  1294.                         }
  1295.                         if (userX == 11 && userY - 1 == 5 && x4 == 1)
  1296.                         {
  1297.                             Console.SetCursorPosition(35, 15);
  1298.                             Console.BackgroundColor = ConsoleColor.Blue;
  1299.                             Console.Write("####");
  1300.                             Console.SetCursorPosition(35, 16);
  1301.                             Console.Write("####");
  1302.                             Console.SetCursorPosition(35, 17);
  1303.                             Console.Write("####");
  1304.                             Console.BackgroundColor = ConsoleColor.White;
  1305.  
  1306.                         }
  1307.                         if (userX == 15 && userY - 1 == 2 && x5 == 1)
  1308.                         {
  1309.                             Console.SetCursorPosition(35, 15);
  1310.                             Console.BackgroundColor = ConsoleColor.Blue;
  1311.                             Console.Write("####");
  1312.                             Console.SetCursorPosition(35, 16);
  1313.                             Console.Write("####");
  1314.                             Console.SetCursorPosition(35, 17);
  1315.                             Console.Write("####");
  1316.                             Console.BackgroundColor = ConsoleColor.White;
  1317.  
  1318.                         }
  1319.                         if (userX == 15 && userY - 1 == 9 && x6 == 1)
  1320.                         {
  1321.                             Console.SetCursorPosition(35, 15);
  1322.                             Console.BackgroundColor = ConsoleColor.Blue;
  1323.                             Console.Write("####");
  1324.                             Console.SetCursorPosition(35, 16);
  1325.                             Console.Write("####");
  1326.                             Console.SetCursorPosition(35, 17);
  1327.                             Console.Write("####");
  1328.                             Console.BackgroundColor = ConsoleColor.White;
  1329.  
  1330.                         }
  1331.  
  1332.                     }
  1333.                     if (naprav == 6)
  1334.                     {
  1335.                         if (map[userX + 1, userY] != '#')
  1336.                         {
  1337.  
  1338.                             if (map[userX + 2, userY] == '#' && map[userX + 1, userY - 1] == '#' && map[userX + 1, userY + 1] == '#') // проверка буквы г на тупик 2
  1339.                             {
  1340.                                 Console.Clear();
  1341.                                 for (int i = 0; i < view1.GetLength(0); i++)
  1342.                                 {
  1343.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  1344.                                     {
  1345.                                         Console.Write(view1[i, j]);
  1346.                                     }
  1347.                                     Console.WriteLine();
  1348.  
  1349.                                 }
  1350.                                 curA = view1;
  1351.                             }
  1352.                            
  1353.  
  1354.                             //отлично
  1355.                             if (map[userX + 1, userY] == ' ' && map[userX + 2, userY] == ' ')  //проверяет два следующий блока
  1356.                             {
  1357.                                 Console.Clear();
  1358.                                 for (int i = 0; i < view3.GetLength(0); i++)
  1359.                                 {
  1360.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  1361.                                     {
  1362.                                         Console.Write(view3[i, j]);
  1363.                                     }
  1364.                                     Console.WriteLine();
  1365.                                 }
  1366.                                 curA = view3;
  1367.  
  1368.                             }
  1369.                             if (map[userX + 1, userY] == ' ')
  1370.                             {
  1371.                                 if (map[userX + 1, userY + 1] == ' ') // проверка буквы г на тупик1
  1372.                                 {
  1373.  
  1374.                                     Console.Clear();
  1375.                                     for (int i = 0; i < view11.GetLength(0); i++)
  1376.                                     {
  1377.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  1378.                                         {
  1379.                                             Console.Write(view11[i, j]);
  1380.                                         }
  1381.                                         Console.WriteLine();
  1382.  
  1383.                                     }
  1384.                                     curA = view11;
  1385.  
  1386.  
  1387.                                 }
  1388.                                 if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик2
  1389.                                 {
  1390.  
  1391.                                     Console.Clear();
  1392.                                     for (int i = 0; i < view12.GetLength(0); i++)
  1393.                                     {
  1394.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  1395.                                         {
  1396.                                             Console.Write(view12[i, j]);
  1397.                                         }
  1398.                                         Console.WriteLine();
  1399.  
  1400.                                     }
  1401.                                     curA = view12;
  1402.  
  1403.  
  1404.                                 }
  1405.  
  1406.  
  1407.                             }
  1408.                             if (map[userX + 2, userY] == '#' && map[userX + 1, userY - 1] == '#') // проверка буквы г на тупик1
  1409.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик1
  1410.                                 {
  1411.  
  1412.                                     Console.Clear();
  1413.                                     for (int i = 0; i < view11.GetLength(0); i++)
  1414.                                     {
  1415.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  1416.                                         {
  1417.                                             Console.Write(view11[i, j]);
  1418.                                         }
  1419.                                         Console.WriteLine();
  1420.  
  1421.                                     }
  1422.                                     curA = view11;
  1423.  
  1424.  
  1425.                                 }
  1426.  
  1427.  
  1428.                             if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик2
  1429.                             {
  1430.  
  1431.                                 Console.Clear();
  1432.                                 for (int i = 0; i < view12.GetLength(0); i++)
  1433.                                 {
  1434.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  1435.                                     {
  1436.                                         Console.Write(view12[i, j]);
  1437.                                     }
  1438.                                     Console.WriteLine();
  1439.  
  1440.                                 }
  1441.                                 curA = view12;
  1442.  
  1443.  
  1444.                             }
  1445.                             if (map[userX + 1, userY - 1] == ' ' && map[userX + 1, userY + 1] == ' ') // проверка буквы Г туда и обратно)
  1446.                             {
  1447.                                 Console.Clear();
  1448.                                 for (int i = 0; i < view13.GetLength(0); i++)
  1449.                                 {
  1450.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  1451.                                     {
  1452.                                         Console.Write(view13[i, j]);
  1453.                                     }
  1454.                                     Console.WriteLine();
  1455.  
  1456.                                 }
  1457.                                 curA = view13;
  1458.                             }
  1459.  
  1460.  
  1461.                         }
  1462.                         if (map[userX + 1, userY] == '#')
  1463.                         {
  1464.                             Console.Clear();
  1465.                             for (int i = 0; i < view2.GetLength(0); i++)
  1466.                             {
  1467.                                 for (int j = 0; j < view2.GetLength(1) - 1; j++)
  1468.                                 {
  1469.                                     Console.Write(view2[i, j]);
  1470.                                 }
  1471.                                 Console.WriteLine();
  1472.                             }
  1473.                             curA = view2;
  1474.                         }
  1475.                         if (userX + 1 == 2 && userY == 11 && x1 == 1)
  1476.                         {
  1477.                             Console.SetCursorPosition(35, 15);
  1478.                             Console.BackgroundColor = ConsoleColor.Blue;
  1479.                             Console.Write("####");
  1480.                             Console.SetCursorPosition(35, 16);
  1481.                             Console.Write("####");
  1482.                             Console.SetCursorPosition(35, 17);
  1483.                             Console.Write("####");
  1484.                             Console.BackgroundColor = ConsoleColor.White;
  1485.  
  1486.                         }
  1487.                         if (userX + 1 == 2 && userY == 5 && x2 == 1)
  1488.                         {
  1489.                             Console.SetCursorPosition(35, 15);
  1490.                             Console.BackgroundColor = ConsoleColor.Blue;
  1491.                             Console.Write("####");
  1492.                             Console.SetCursorPosition(35, 16);
  1493.                             Console.Write("####");
  1494.                             Console.SetCursorPosition(35, 17);
  1495.                             Console.Write("####");
  1496.                             Console.BackgroundColor = ConsoleColor.White;
  1497.  
  1498.                         }
  1499.                         if (userX + 1 == 5 && userY == 3 && x3 == 1)
  1500.                         {
  1501.                             Console.SetCursorPosition(35, 15);
  1502.                             Console.BackgroundColor = ConsoleColor.Blue;
  1503.                             Console.Write("####");
  1504.                             Console.SetCursorPosition(35, 16);
  1505.                             Console.Write("####");
  1506.                             Console.SetCursorPosition(35, 17);
  1507.                             Console.Write("####");
  1508.                             Console.BackgroundColor = ConsoleColor.White;
  1509.  
  1510.                         }
  1511.                         if (userX + 1 == 11 && userY == 5 && x4 == 1)
  1512.                         {
  1513.                             Console.SetCursorPosition(35, 15);
  1514.                             Console.BackgroundColor = ConsoleColor.Blue;
  1515.                             Console.Write("####");
  1516.                             Console.SetCursorPosition(35, 16);
  1517.                             Console.Write("####");
  1518.                             Console.SetCursorPosition(35, 17);
  1519.                             Console.Write("####");
  1520.                             Console.BackgroundColor = ConsoleColor.White;
  1521.  
  1522.                         }
  1523.                         if (userX + 1 == 15 && userY == 2 && x5 == 1)
  1524.                         {
  1525.                             Console.SetCursorPosition(35, 15);
  1526.                             Console.BackgroundColor = ConsoleColor.Blue;
  1527.                             Console.Write("####");
  1528.                             Console.SetCursorPosition(35, 16);
  1529.                             Console.Write("####");
  1530.                             Console.SetCursorPosition(35, 17);
  1531.                             Console.Write("####");
  1532.                             Console.BackgroundColor = ConsoleColor.White;
  1533.  
  1534.                         }
  1535.                         if (userX + 1 == 15 && userY == 9 && x6 == 1)
  1536.                         {
  1537.                             Console.SetCursorPosition(35, 15);
  1538.                             Console.BackgroundColor = ConsoleColor.Blue;
  1539.                             Console.Write("####");
  1540.                             Console.SetCursorPosition(35, 16);
  1541.                             Console.Write("####");
  1542.                             Console.SetCursorPosition(35, 17);
  1543.                             Console.Write("####");
  1544.                             Console.BackgroundColor = ConsoleColor.White;
  1545.  
  1546.                         }
  1547.                     }
  1548.                 }
  1549.                 //
  1550.                 if (charKey.Key == ConsoleKey.RightArrow)
  1551.                 {
  1552.                     naprav--;
  1553.                     if (naprav == 3)
  1554.                     {
  1555.                         naprav = 7;
  1556.                     }
  1557.  
  1558.                     if (naprav == 8)
  1559.                     {
  1560.                         naprav = 4;
  1561.                     }
  1562.                     if (naprav == 7) // проверяет направление НАВЕРХ userx -1
  1563.                     {
  1564.                         if (map[userX, userY + 1] != '#')
  1565.                         {
  1566.  
  1567.  
  1568.                             if (map[userX, userY + 2] == '#' && map[userX - 1, userY + 1] == '#' && map[userX + 1, userY + 1] == '#') // проверка буквы г на тупик 2
  1569.                             {
  1570.                                 Console.Clear();
  1571.                                 for (int i = 0; i < view1.GetLength(0); i++)
  1572.                                 {
  1573.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  1574.                                     {
  1575.                                         Console.Write(view1[i, j]);
  1576.                                     }
  1577.                                     Console.WriteLine();
  1578.  
  1579.                                 }
  1580.                                 curA = view1;
  1581.                             }
  1582.                            
  1583.  
  1584.                             //отлично
  1585.                             if (map[userX, userY + 1] == ' ' && map[userX, userY + 2] == ' ')  //проверяет два следующий блока
  1586.                             {
  1587.                                 Console.Clear();
  1588.                                 for (int i = 0; i < view3.GetLength(0); i++)
  1589.                                 {
  1590.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  1591.                                     {
  1592.                                         Console.Write(view3[i, j]);
  1593.                                     }
  1594.                                     Console.WriteLine();
  1595.                                 }
  1596.                                 curA = view3;
  1597.  
  1598.                             }
  1599.                             if (map[userX, userY + 1] == ' ')
  1600.                             {
  1601.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик1
  1602.                                 {
  1603.  
  1604.                                     Console.Clear();
  1605.                                     for (int i = 0; i < view11.GetLength(0); i++)
  1606.                                     {
  1607.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  1608.                                         {
  1609.                                             Console.Write(view11[i, j]);
  1610.                                         }
  1611.                                         Console.WriteLine();
  1612.  
  1613.                                     }
  1614.                                     curA = view11;
  1615.  
  1616.  
  1617.                                 }
  1618.                                 if (map[userX + 1, userY + 1] == ' ') // проверка буквы г на тупик2
  1619.                                 {
  1620.  
  1621.                                     Console.Clear();
  1622.                                     for (int i = 0; i < view12.GetLength(0); i++)
  1623.                                     {
  1624.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  1625.                                         {
  1626.                                             Console.Write(view12[i, j]);
  1627.                                         }
  1628.                                         Console.WriteLine();
  1629.  
  1630.                                     }
  1631.                                     curA = view12;
  1632.  
  1633.  
  1634.                                 }
  1635.  
  1636.  
  1637.                             }
  1638.                             if (map[userX, userY + 2] == '#' && map[userX + 1, userY + 1] == '#') // проверка буквы г на тупик1
  1639.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик1
  1640.                                 {
  1641.  
  1642.                                     Console.Clear();
  1643.                                     for (int i = 0; i < view11.GetLength(0); i++)
  1644.                                     {
  1645.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  1646.                                         {
  1647.                                             Console.Write(view11[i, j]);
  1648.                                         }
  1649.                                         Console.WriteLine();
  1650.  
  1651.                                     }
  1652.                                     curA = view11;
  1653.  
  1654.  
  1655.                                 }
  1656.                             if (map[userX + 1, userY + 1] == ' ') // проверка буквы г на тупик2
  1657.                             {
  1658.  
  1659.                                 Console.Clear();
  1660.                                 for (int i = 0; i < view12.GetLength(0); i++)
  1661.                                 {
  1662.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  1663.                                     {
  1664.                                         Console.Write(view12[i, j]);
  1665.                                     }
  1666.                                     Console.WriteLine();
  1667.  
  1668.                                 }
  1669.                                 curA = view12;
  1670.  
  1671.  
  1672.                             }
  1673.                             if (map[userX + 1, userY + 1] == ' ' && map[userX - 1, userY + 1] == ' ') // проверка буквы Г туда и обратно)
  1674.                             {
  1675.                                 Console.Clear();
  1676.                                 for (int i = 0; i < view13.GetLength(0); i++)
  1677.                                 {
  1678.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  1679.                                     {
  1680.                                         Console.Write(view13[i, j]);
  1681.                                     }
  1682.                                     Console.WriteLine();
  1683.  
  1684.                                 }
  1685.                                 curA = view13;
  1686.                             }
  1687.  
  1688.                         }
  1689.                         if (map[userX, userY + 1] == '#')
  1690.                         {
  1691.                             Console.Clear();
  1692.                             for (int i = 0; i < view2.GetLength(0); i++)
  1693.                             {
  1694.                                 for (int j = 0; j < view2.GetLength(1) - 1; j++)
  1695.                                 {
  1696.                                     Console.Write(view2[i, j]);
  1697.                                 }
  1698.                                 Console.WriteLine();
  1699.                             }
  1700.                             curA = view2;
  1701.                         }
  1702.                         if (userX == 2 && userY + 1 == 11 && x1 == 1)
  1703.                         {
  1704.                             Console.SetCursorPosition(35, 15);
  1705.                             Console.BackgroundColor = ConsoleColor.Blue;
  1706.                             Console.Write("####");
  1707.                             Console.SetCursorPosition(35, 16);
  1708.                             Console.Write("####");
  1709.                             Console.SetCursorPosition(35, 17);
  1710.                             Console.Write("####");
  1711.                             Console.BackgroundColor = ConsoleColor.White;
  1712.  
  1713.                         }
  1714.                         if (userX == 2 && userY + 1 == 5 && x2 == 1)
  1715.                         {
  1716.                             Console.SetCursorPosition(35, 15);
  1717.                             Console.BackgroundColor = ConsoleColor.Blue;
  1718.                             Console.Write("####");
  1719.                             Console.SetCursorPosition(35, 16);
  1720.                             Console.Write("####");
  1721.                             Console.SetCursorPosition(35, 17);
  1722.                             Console.Write("####");
  1723.                             Console.BackgroundColor = ConsoleColor.White;
  1724.  
  1725.                         }
  1726.                         if (userX == 5 && userY + 1 == 3 && x3 == 1)
  1727.                         {
  1728.                             Console.SetCursorPosition(35, 15);
  1729.                             Console.BackgroundColor = ConsoleColor.Blue;
  1730.                             Console.Write("####");
  1731.                             Console.SetCursorPosition(35, 16);
  1732.                             Console.Write("####");
  1733.                             Console.SetCursorPosition(35, 17);
  1734.                             Console.Write("####");
  1735.                             Console.BackgroundColor = ConsoleColor.White;
  1736.  
  1737.                         }
  1738.                         if (userX == 11 && userY + 1 == 5 && x4 == 1)
  1739.                         {
  1740.                             Console.SetCursorPosition(35, 15);
  1741.                             Console.BackgroundColor = ConsoleColor.Blue;
  1742.                             Console.Write("####");
  1743.                             Console.SetCursorPosition(35, 16);
  1744.                             Console.Write("####");
  1745.                             Console.SetCursorPosition(35, 17);
  1746.                             Console.Write("####");
  1747.                             Console.BackgroundColor = ConsoleColor.White;
  1748.  
  1749.                         }
  1750.                         if (userX == 15 && userY + 1 == 2 && x5 == 1)
  1751.                         {
  1752.                             Console.SetCursorPosition(35, 15);
  1753.                             Console.BackgroundColor = ConsoleColor.Blue;
  1754.                             Console.Write("####");
  1755.                             Console.SetCursorPosition(35, 16);
  1756.                             Console.Write("####");
  1757.                             Console.SetCursorPosition(35, 17);
  1758.                             Console.Write("####");
  1759.                             Console.BackgroundColor = ConsoleColor.White;
  1760.  
  1761.                         }
  1762.                         if (userX == 15 && userY + 1 == 9 && x6 == 1)
  1763.                         {
  1764.                             Console.SetCursorPosition(35, 15);
  1765.                             Console.BackgroundColor = ConsoleColor.Blue;
  1766.                             Console.Write("####");
  1767.                             Console.SetCursorPosition(35, 16);
  1768.                             Console.Write("####");
  1769.                             Console.SetCursorPosition(35, 17);
  1770.                             Console.Write("####");
  1771.                             Console.BackgroundColor = ConsoleColor.White;
  1772.  
  1773.                         }
  1774.  
  1775.                     }
  1776.                     if (naprav == 4) // проверяет направление НАВЕРХ userx -1
  1777.                     {
  1778.                         if (map[userX - 1, userY] != '#')
  1779.                         {
  1780.  
  1781.  
  1782.                             if (map[userX - 2, userY] == '#' && map[userX - 1, userY - 1] == '#' && map[userX - 1, userY + 1] == '#') // проверка буквы г на тупик 2
  1783.                             {
  1784.                                 Console.Clear();
  1785.                                 for (int i = 0; i < view1.GetLength(0); i++)
  1786.                                 {
  1787.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  1788.                                     {
  1789.                                         Console.Write(view1[i, j]);
  1790.                                     }
  1791.                                     Console.WriteLine();
  1792.  
  1793.                                 }
  1794.                                 curA = view1;
  1795.                             }
  1796.                            
  1797.  
  1798.                             //отлично
  1799.                             if (map[userX - 1, userY] == ' ' && map[userX - 2, userY] == ' ')  //проверяет два следующий блока
  1800.                             {
  1801.                                 Console.Clear();
  1802.                                 for (int i = 0; i < view3.GetLength(0); i++)
  1803.                                 {
  1804.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  1805.                                     {
  1806.                                         Console.Write(view3[i, j]);
  1807.                                     }
  1808.                                     Console.WriteLine();
  1809.                                 }
  1810.                                 curA = view3;
  1811.  
  1812.                             }
  1813.                             if (map[userX - 1, userY] == ' ')
  1814.                             {
  1815.                                 if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик1
  1816.                                 {
  1817.  
  1818.                                     Console.Clear();
  1819.                                     for (int i = 0; i < view11.GetLength(0); i++)
  1820.                                     {
  1821.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  1822.                                         {
  1823.                                             Console.Write(view11[i, j]);
  1824.                                         }
  1825.                                         Console.WriteLine();
  1826.  
  1827.                                     }
  1828.                                     curA = view11;
  1829.  
  1830.  
  1831.                                 }
  1832.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик2
  1833.                                 {
  1834.  
  1835.                                     Console.Clear();
  1836.                                     for (int i = 0; i < view12.GetLength(0); i++)
  1837.                                     {
  1838.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  1839.                                         {
  1840.                                             Console.Write(view12[i, j]);
  1841.                                         }
  1842.                                         Console.WriteLine();
  1843.  
  1844.                                     }
  1845.                                     curA = view12;
  1846.  
  1847.  
  1848.                                 }
  1849.  
  1850.  
  1851.                             }
  1852.                             if (map[userX - 2, userY] == '#' && map[userX - 1, userY - 1] == '#') // проверка буквы г на тупик1
  1853.                                 if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик1
  1854.                                 {
  1855.  
  1856.                                     Console.Clear();
  1857.                                     for (int i = 0; i < view11.GetLength(0); i++)
  1858.                                     {
  1859.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  1860.                                         {
  1861.                                             Console.Write(view11[i, j]);
  1862.                                         }
  1863.                                         Console.WriteLine();
  1864.  
  1865.                                     }
  1866.                                     curA = view11;
  1867.  
  1868.  
  1869.                                 }
  1870.                             if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик2
  1871.                             {
  1872.  
  1873.                                 Console.Clear();
  1874.                                 for (int i = 0; i < view12.GetLength(0); i++)
  1875.                                 {
  1876.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  1877.                                     {
  1878.                                         Console.Write(view12[i, j]);
  1879.                                     }
  1880.                                     Console.WriteLine();
  1881.  
  1882.                                 }
  1883.                                 curA = view12;
  1884.  
  1885.  
  1886.                             }
  1887.                             if (map[userX - 1, userY - 1] == ' ' && map[userX - 1, userY + 1] == ' ') // проверка буквы Г туда и обратно)
  1888.                             {
  1889.                                 Console.Clear();
  1890.                                 for (int i = 0; i < view13.GetLength(0); i++)
  1891.                                 {
  1892.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  1893.                                     {
  1894.                                         Console.Write(view13[i, j]);
  1895.                                     }
  1896.                                     Console.WriteLine();
  1897.  
  1898.                                 }
  1899.                                 curA = view13;
  1900.                             }
  1901.  
  1902.                         }
  1903.                         if (map[userX - 1, userY] == '#')
  1904.                         {
  1905.                             Console.Clear();
  1906.                             for (int i = 0; i < view2.GetLength(0); i++)
  1907.                             {
  1908.                                 for (int j = 0; j < view2.GetLength(1) - 1; j++)
  1909.                                 {
  1910.                                     Console.Write(view2[i, j]);
  1911.                                 }
  1912.                                 Console.WriteLine();
  1913.                             }
  1914.                             curA = view2;
  1915.                         }
  1916.                         if (userX - 1 == 2 && userY == 11 && x1 == 1)
  1917.                         {
  1918.                             Console.SetCursorPosition(35, 15);
  1919.                             Console.BackgroundColor = ConsoleColor.Blue;
  1920.                             Console.Write("####");
  1921.                             Console.SetCursorPosition(35, 16);
  1922.                             Console.Write("####");
  1923.                             Console.SetCursorPosition(35, 17);
  1924.                             Console.Write("####");
  1925.                             Console.BackgroundColor = ConsoleColor.White;
  1926.  
  1927.                         }
  1928.                         if (userX - 1 == 2 && userY == 5 && x2 == 1)
  1929.                         {
  1930.                             Console.SetCursorPosition(35, 15);
  1931.                             Console.BackgroundColor = ConsoleColor.Blue;
  1932.                             Console.Write("####");
  1933.                             Console.SetCursorPosition(35, 16);
  1934.                             Console.Write("####");
  1935.                             Console.SetCursorPosition(35, 17);
  1936.                             Console.Write("####");
  1937.                             Console.BackgroundColor = ConsoleColor.White;
  1938.  
  1939.                         }
  1940.                         if (userX - 1 == 5 && userY == 3 && x3 == 1)
  1941.                         {
  1942.                             Console.SetCursorPosition(35, 15);
  1943.                             Console.BackgroundColor = ConsoleColor.Blue;
  1944.                             Console.Write("####");
  1945.                             Console.SetCursorPosition(35, 16);
  1946.                             Console.Write("####");
  1947.                             Console.SetCursorPosition(35, 17);
  1948.                             Console.Write("####");
  1949.                             Console.BackgroundColor = ConsoleColor.White;
  1950.  
  1951.                         }
  1952.                         if (userX - 1 == 11 && userY == 5 && x4 == 1)
  1953.                         {
  1954.                             Console.SetCursorPosition(35, 15);
  1955.                             Console.BackgroundColor = ConsoleColor.Blue;
  1956.                             Console.Write("####");
  1957.                             Console.SetCursorPosition(35, 16);
  1958.                             Console.Write("####");
  1959.                             Console.SetCursorPosition(35, 17);
  1960.                             Console.Write("####");
  1961.                             Console.BackgroundColor = ConsoleColor.White;
  1962.  
  1963.                         }
  1964.                         if (userX - 1 == 15 && userY == 2 && x5 == 1)
  1965.                         {
  1966.                             Console.SetCursorPosition(35, 15);
  1967.                             Console.BackgroundColor = ConsoleColor.Blue;
  1968.                             Console.Write("####");
  1969.                             Console.SetCursorPosition(35, 16);
  1970.                             Console.Write("####");
  1971.                             Console.SetCursorPosition(35, 17);
  1972.                             Console.Write("####");
  1973.                             Console.BackgroundColor = ConsoleColor.White;
  1974.  
  1975.                         }
  1976.                         if (userX - 1 == 15 && userY == 9 && x6 == 1)
  1977.                         {
  1978.                             Console.SetCursorPosition(35, 15);
  1979.                             Console.BackgroundColor = ConsoleColor.Blue;
  1980.                             Console.Write("####");
  1981.                             Console.SetCursorPosition(35, 16);
  1982.                             Console.Write("####");
  1983.                             Console.SetCursorPosition(35, 17);
  1984.                             Console.Write("####");
  1985.                             Console.BackgroundColor = ConsoleColor.White;
  1986.  
  1987.                         }
  1988.                     }
  1989.                     if (naprav == 5)
  1990.                     {
  1991.                         if (map[userX, userY - 1] != '#')
  1992.                         {
  1993.  
  1994.  
  1995.                             if (map[userX, userY - 2] == '#' && map[userX - 1, userY - 1] == '#' && map[userX + 1, userY - 1] == '#') // проверка буквы г на тупик 2
  1996.                             {
  1997.                                 Console.Clear();
  1998.                                 for (int i = 0; i < view1.GetLength(0); i++)
  1999.                                 {
  2000.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  2001.                                     {
  2002.                                         Console.Write(view1[i, j]);
  2003.                                     }
  2004.                                     Console.WriteLine();
  2005.  
  2006.                                 }
  2007.                                 curA = view1;
  2008.                             }
  2009.                            
  2010.  
  2011.                             //отлично
  2012.                             if (map[userX, userY - 1] == ' ' && map[userX, userY - 2] == ' ')  //проверяет два следующий блока
  2013.                             {
  2014.                                 Console.Clear();
  2015.                                 for (int i = 0; i < view3.GetLength(0); i++)
  2016.                                 {
  2017.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  2018.                                     {
  2019.                                         Console.Write(view3[i, j]);
  2020.                                     }
  2021.                                     Console.WriteLine();
  2022.                                 }
  2023.                                 curA = view3;
  2024.  
  2025.                             }
  2026.                             if (map[userX, userY - 1] == ' ')
  2027.                             {
  2028.                                 if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик1
  2029.                                 {
  2030.  
  2031.                                     Console.Clear();
  2032.                                     for (int i = 0; i < view11.GetLength(0); i++)
  2033.                                     {
  2034.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  2035.                                         {
  2036.                                             Console.Write(view11[i, j]);
  2037.                                         }
  2038.                                         Console.WriteLine();
  2039.  
  2040.                                     }
  2041.                                     curA = view11;
  2042.  
  2043.  
  2044.                                 }
  2045.                                 if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик2
  2046.                                 {
  2047.  
  2048.                                     Console.Clear();
  2049.                                     for (int i = 0; i < view12.GetLength(0); i++)
  2050.                                     {
  2051.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  2052.                                         {
  2053.                                             Console.Write(view12[i, j]);
  2054.                                         }
  2055.                                         Console.WriteLine();
  2056.  
  2057.                                     }
  2058.                                     curA = view12;
  2059.  
  2060.  
  2061.                                 }
  2062.  
  2063.  
  2064.                             }
  2065.                             if (map[userX, userY - 2] == '#' && map[userX - 1, userY - 1] == '#') // проверка буквы г на тупик1
  2066.                                 if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик1
  2067.                                 {
  2068.  
  2069.                                     Console.Clear();
  2070.                                     for (int i = 0; i < view11.GetLength(0); i++)
  2071.                                     {
  2072.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  2073.                                         {
  2074.                                             Console.Write(view11[i, j]);
  2075.                                         }
  2076.                                         Console.WriteLine();
  2077.  
  2078.                                     }
  2079.                                     curA = view11;
  2080.  
  2081.  
  2082.                                 }
  2083.  
  2084.  
  2085.                             if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик2
  2086.                             {
  2087.  
  2088.                                 Console.Clear();
  2089.                                 for (int i = 0; i < view12.GetLength(0); i++)
  2090.                                 {
  2091.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  2092.                                     {
  2093.                                         Console.Write(view12[i, j]);
  2094.                                     }
  2095.                                     Console.WriteLine();
  2096.  
  2097.                                 }
  2098.                                 curA = view12;
  2099.  
  2100.  
  2101.                             }
  2102.                             if (map[userX - 1, userY - 1] == ' ' && map[userX + 1, userY - 1] == ' ') // проверка буквы Г туда и обратно)
  2103.                             {
  2104.                                 Console.Clear();
  2105.                                 for (int i = 0; i < view13.GetLength(0); i++)
  2106.                                 {
  2107.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  2108.                                     {
  2109.                                         Console.Write(view13[i, j]);
  2110.                                     }
  2111.                                     Console.WriteLine();
  2112.  
  2113.                                 }
  2114.                                 curA = view13;
  2115.                             }
  2116.  
  2117.  
  2118.                         }
  2119.                         if (map[userX, userY - 1] == '#')
  2120.                         {
  2121.                             Console.Clear();
  2122.                             for (int i = 0; i < view2.GetLength(0); i++)
  2123.                             {
  2124.                                 for (int j = 0; j < view2.GetLength(1) - 1; j++)
  2125.                                 {
  2126.                                     Console.Write(view2[i, j]);
  2127.                                 }
  2128.                                 Console.WriteLine();
  2129.                             }
  2130.                             curA = view2;
  2131.                         }
  2132.                         if (userX == 2 && userY - 1 == 11 && x1 == 1)
  2133.                         {
  2134.                             Console.SetCursorPosition(35, 15);
  2135.                             Console.BackgroundColor = ConsoleColor.Blue;
  2136.                             Console.Write("####");
  2137.                             Console.SetCursorPosition(35, 16);
  2138.                             Console.Write("####");
  2139.                             Console.SetCursorPosition(35, 17);
  2140.                             Console.Write("####");
  2141.                             Console.BackgroundColor = ConsoleColor.White;
  2142.  
  2143.                         }
  2144.                         if (userX == 2 && userY - 1 == 5 && x2 == 1)
  2145.                         {
  2146.                             Console.SetCursorPosition(35, 15);
  2147.                             Console.BackgroundColor = ConsoleColor.Blue;
  2148.                             Console.Write("####");
  2149.                             Console.SetCursorPosition(35, 16);
  2150.                             Console.Write("####");
  2151.                             Console.SetCursorPosition(35, 17);
  2152.                             Console.Write("####");
  2153.                             Console.BackgroundColor = ConsoleColor.White;
  2154.  
  2155.                         }
  2156.                         if (userX == 5 && userY - 1 == 3 && x3 == 1)
  2157.                         {
  2158.                             Console.SetCursorPosition(35, 15);
  2159.                             Console.BackgroundColor = ConsoleColor.Blue;
  2160.                             Console.Write("####");
  2161.                             Console.SetCursorPosition(35, 16);
  2162.                             Console.Write("####");
  2163.                             Console.SetCursorPosition(35, 17);
  2164.                             Console.Write("####");
  2165.                             Console.BackgroundColor = ConsoleColor.White;
  2166.  
  2167.                         }
  2168.                         if (userX == 11 && userY - 1 == 5 && x4 == 1)
  2169.                         {
  2170.                             Console.SetCursorPosition(35, 15);
  2171.                             Console.BackgroundColor = ConsoleColor.Blue;
  2172.                             Console.Write("####");
  2173.                             Console.SetCursorPosition(35, 16);
  2174.                             Console.Write("####");
  2175.                             Console.SetCursorPosition(35, 17);
  2176.                             Console.Write("####");
  2177.                             Console.BackgroundColor = ConsoleColor.White;
  2178.  
  2179.                         }
  2180.                         if (userX == 15 && userY - 1 == 2 && x5 == 1)
  2181.                         {
  2182.                             Console.SetCursorPosition(35, 15);
  2183.                             Console.BackgroundColor = ConsoleColor.Blue;
  2184.                             Console.Write("####");
  2185.                             Console.SetCursorPosition(35, 16);
  2186.                             Console.Write("####");
  2187.                             Console.SetCursorPosition(35, 17);
  2188.                             Console.Write("####");
  2189.                             Console.BackgroundColor = ConsoleColor.White;
  2190.  
  2191.                         }
  2192.                         if (userX == 15 && userY - 1 == 9 && x6 == 1)
  2193.                         {
  2194.                             Console.SetCursorPosition(35, 15);
  2195.                             Console.BackgroundColor = ConsoleColor.Blue;
  2196.                             Console.Write("####");
  2197.                             Console.SetCursorPosition(35, 16);
  2198.                             Console.Write("####");
  2199.                             Console.SetCursorPosition(35, 17);
  2200.                             Console.Write("####");
  2201.                             Console.BackgroundColor = ConsoleColor.White;
  2202.  
  2203.                         }
  2204.                     }
  2205.                     if (naprav == 6)
  2206.                     {
  2207.                         if (map[userX + 1, userY] != '#')
  2208.                         {
  2209.  
  2210.                             if (map[userX + 2, userY] == '#' && map[userX + 1, userY - 1] == '#' && map[userX + 1, userY + 1] == '#') // проверка буквы г на тупик 2
  2211.                             {
  2212.                                 Console.Clear();
  2213.                                 for (int i = 0; i < view1.GetLength(0); i++)
  2214.                                 {
  2215.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  2216.                                     {
  2217.                                         Console.Write(view1[i, j]);
  2218.                                     }
  2219.                                     Console.WriteLine();
  2220.  
  2221.                                 }
  2222.                                 curA = view1;
  2223.                             }
  2224.                            
  2225.  
  2226.                             //отлично
  2227.                             if (map[userX + 1, userY] == ' ' && map[userX + 2, userY] == ' ')  //проверяет два следующий блока
  2228.                             {
  2229.                                 Console.Clear();
  2230.                                 for (int i = 0; i < view3.GetLength(0); i++)
  2231.                                 {
  2232.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  2233.                                     {
  2234.                                         Console.Write(view3[i, j]);
  2235.                                     }
  2236.                                     Console.WriteLine();
  2237.                                 }
  2238.                                 curA = view3;
  2239.  
  2240.                             }
  2241.                             if (map[userX + 1, userY] == ' ')
  2242.                             {
  2243.                                 if (map[userX + 1, userY + 1] == ' ') // проверка буквы г на тупик1
  2244.                                 {
  2245.  
  2246.                                     Console.Clear();
  2247.                                     for (int i = 0; i < view11.GetLength(0); i++)
  2248.                                     {
  2249.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  2250.                                         {
  2251.                                             Console.Write(view11[i, j]);
  2252.                                         }
  2253.                                         Console.WriteLine();
  2254.  
  2255.                                     }
  2256.                                     curA = view11;
  2257.  
  2258.  
  2259.                                 }
  2260.                                 if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик2
  2261.                                 {
  2262.  
  2263.                                     Console.Clear();
  2264.                                     for (int i = 0; i < view12.GetLength(0); i++)
  2265.                                     {
  2266.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  2267.                                         {
  2268.                                             Console.Write(view12[i, j]);
  2269.                                         }
  2270.                                         Console.WriteLine();
  2271.  
  2272.                                     }
  2273.                                     curA = view12;
  2274.  
  2275.  
  2276.                                 }
  2277.  
  2278.  
  2279.                             }
  2280.                             if (map[userX + 2, userY] == '#' && map[userX + 1, userY - 1] == '#') // проверка буквы г на тупик1
  2281.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик1
  2282.                                 {
  2283.  
  2284.                                     Console.Clear();
  2285.                                     for (int i = 0; i < view11.GetLength(0); i++)
  2286.                                     {
  2287.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  2288.                                         {
  2289.                                             Console.Write(view11[i, j]);
  2290.                                         }
  2291.                                         Console.WriteLine();
  2292.  
  2293.                                     }
  2294.                                     curA = view11;
  2295.  
  2296.  
  2297.                                 }
  2298.  
  2299.  
  2300.                             if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик2
  2301.                             {
  2302.  
  2303.                                 Console.Clear();
  2304.                                 for (int i = 0; i < view12.GetLength(0); i++)
  2305.                                 {
  2306.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  2307.                                     {
  2308.                                         Console.Write(view12[i, j]);
  2309.                                     }
  2310.                                     Console.WriteLine();
  2311.  
  2312.                                 }
  2313.                                 curA = view12;
  2314.  
  2315.  
  2316.                             }
  2317.                             if (map[userX + 1, userY - 1] == ' ' && map[userX + 1, userY + 1] == ' ') // проверка буквы Г туда и обратно)
  2318.                             {
  2319.                                 Console.Clear();
  2320.                                 for (int i = 0; i < view13.GetLength(0); i++)
  2321.                                 {
  2322.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  2323.                                     {
  2324.                                         Console.Write(view13[i, j]);
  2325.                                     }
  2326.                                     Console.WriteLine();
  2327.  
  2328.                                 }
  2329.                                 curA = view13;
  2330.                             }
  2331.  
  2332.  
  2333.                         }
  2334.                         if (map[userX + 1, userY] == '#')
  2335.                         {
  2336.                             Console.Clear();
  2337.                             for (int i = 0; i < view2.GetLength(0); i++)
  2338.                             {
  2339.                                 for (int j = 0; j < view2.GetLength(1) - 1; j++)
  2340.                                 {
  2341.                                     Console.Write(view2[i, j]);
  2342.                                 }
  2343.                                 Console.WriteLine();
  2344.                             }
  2345.                             curA = view2;
  2346.                         }
  2347.                         if (userX + 1 == 2 && userY == 11 && x1 == 1)
  2348.                         {
  2349.                             Console.SetCursorPosition(35, 15);
  2350.                             Console.BackgroundColor = ConsoleColor.Blue;
  2351.                             Console.Write("####");
  2352.                             Console.SetCursorPosition(35, 16);
  2353.                             Console.Write("####");
  2354.                             Console.SetCursorPosition(35, 17);
  2355.                             Console.Write("####");
  2356.                             Console.BackgroundColor = ConsoleColor.White;
  2357.  
  2358.                         }
  2359.                         if (userX + 1 == 2 && userY == 5 && x2 == 1)
  2360.                         {
  2361.                             Console.SetCursorPosition(35, 15);
  2362.                             Console.BackgroundColor = ConsoleColor.Blue;
  2363.                             Console.Write("####");
  2364.                             Console.SetCursorPosition(35, 16);
  2365.                             Console.Write("####");
  2366.                             Console.SetCursorPosition(35, 17);
  2367.                             Console.Write("####");
  2368.                             Console.BackgroundColor = ConsoleColor.White;
  2369.  
  2370.                         }
  2371.                         if (userX + 1 == 5 && userY == 3 && x3 == 1)
  2372.                         {
  2373.                             Console.SetCursorPosition(35, 15);
  2374.                             Console.BackgroundColor = ConsoleColor.Blue;
  2375.                             Console.Write("####");
  2376.                             Console.SetCursorPosition(35, 16);
  2377.                             Console.Write("####");
  2378.                             Console.SetCursorPosition(35, 17);
  2379.                             Console.Write("####");
  2380.                             Console.BackgroundColor = ConsoleColor.White;
  2381.  
  2382.                         }
  2383.                         if (userX + 1 == 11 && userY == 5 && x4 == 1)
  2384.                         {
  2385.                             Console.SetCursorPosition(35, 15);
  2386.                             Console.BackgroundColor = ConsoleColor.Blue;
  2387.                             Console.Write("####");
  2388.                             Console.SetCursorPosition(35, 16);
  2389.                             Console.Write("####");
  2390.                             Console.SetCursorPosition(35, 17);
  2391.                             Console.Write("####");
  2392.                             Console.BackgroundColor = ConsoleColor.White;
  2393.  
  2394.                         }
  2395.                         if (userX + 1 == 15 && userY == 2 && x5 == 1)
  2396.                         {
  2397.                             Console.SetCursorPosition(35, 15);
  2398.                             Console.BackgroundColor = ConsoleColor.Blue;
  2399.                             Console.Write("####");
  2400.                             Console.SetCursorPosition(35, 16);
  2401.                             Console.Write("####");
  2402.                             Console.SetCursorPosition(35, 17);
  2403.                             Console.Write("####");
  2404.                             Console.BackgroundColor = ConsoleColor.White;
  2405.  
  2406.                         }
  2407.                         if (userX + 1 == 15 && userY == 9 && x6 == 1)
  2408.                         {
  2409.                             Console.SetCursorPosition(35, 15);
  2410.                             Console.BackgroundColor = ConsoleColor.Blue;
  2411.                             Console.Write("####");
  2412.                             Console.SetCursorPosition(35, 16);
  2413.                             Console.Write("####");
  2414.                             Console.SetCursorPosition(35, 17);
  2415.                             Console.Write("####");
  2416.                             Console.BackgroundColor = ConsoleColor.White;
  2417.  
  2418.                         }
  2419.                     }
  2420.                 }
  2421.                 //
  2422.                 if (naprav == 3)
  2423.                 {
  2424.                     naprav = 7;
  2425.                 }
  2426.  
  2427.                 if (naprav == 8)
  2428.                 {
  2429.                     naprav = 4;
  2430.                 }
  2431.                 //
  2432.                 //
  2433.                 if (charKey.Key == ConsoleKey.UpArrow)
  2434.                 {
  2435.                     if (naprav == 7) // проверяет направление НАВЕРХ userx -1
  2436.                     {
  2437.                         if (map[userX, userY+1] != '#')
  2438.                         {
  2439.                             userY++;
  2440.  
  2441.                             if (map[userX, userY+2] == '#' && map[userX - 1, userY + 1] == '#' && map[userX + 1, userY + 1] == '#') // проверка буквы г на тупик 2
  2442.                             {
  2443.                                 Console.Clear();
  2444.                                 for (int i = 0; i < view1.GetLength(0); i++)
  2445.                                 {
  2446.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  2447.                                     {
  2448.                                         Console.Write(view1[i, j]);
  2449.                                     }
  2450.                                     Console.WriteLine();
  2451.  
  2452.                                 }
  2453.                                 curA = view1;
  2454.                             }
  2455.                             if (map[userX, userY+1] == '#')
  2456.                             {
  2457.                                 Console.Clear();
  2458.                                 for (int i = 0; i < view2.GetLength(0); i++)
  2459.                                 {
  2460.                                     for (int j = 0; j < view2.GetLength(1) - 1; j++)
  2461.                                     {
  2462.                                         Console.Write(view2[i, j]);
  2463.                                     }
  2464.                                     Console.WriteLine();
  2465.                                 }
  2466.                                 curA = view2;
  2467.                             }
  2468.  
  2469.                             //отлично
  2470.                             if (map[userX, userY+1] == ' ' && map[userX, userY+2] == ' ')  //проверяет два следующий блока
  2471.                             {
  2472.                                 Console.Clear();
  2473.                                 for (int i = 0; i < view3.GetLength(0); i++)
  2474.                                 {
  2475.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  2476.                                     {
  2477.                                         Console.Write(view3[i, j]);
  2478.                                     }
  2479.                                     Console.WriteLine();
  2480.                                 }
  2481.                                 curA = view3;
  2482.  
  2483.                             }
  2484.                             if (map[userX, userY+1] == ' ')
  2485.                             {
  2486.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик1
  2487.                                 {
  2488.  
  2489.                                     Console.Clear();
  2490.                                     for (int i = 0; i < view11.GetLength(0); i++)
  2491.                                     {
  2492.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  2493.                                         {
  2494.                                             Console.Write(view11[i, j]);
  2495.                                         }
  2496.                                         Console.WriteLine();
  2497.  
  2498.                                     }
  2499.                                     curA = view11;
  2500.  
  2501.  
  2502.                                 }
  2503.                                 if (map[userX + 1, userY + 1] == ' ') // проверка буквы г на тупик2
  2504.                                 {
  2505.  
  2506.                                     Console.Clear();
  2507.                                     for (int i = 0; i < view12.GetLength(0); i++)
  2508.                                     {
  2509.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  2510.                                         {
  2511.                                             Console.Write(view12[i, j]);
  2512.                                         }
  2513.                                         Console.WriteLine();
  2514.  
  2515.                                     }
  2516.                                     curA = view12;
  2517.  
  2518.  
  2519.                                 }
  2520.  
  2521.  
  2522.                             }
  2523.                             if (map[userX, userY+2] == '#' && map[userX + 1, userY + 1] == '#') // проверка буквы г на тупик1
  2524.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик1
  2525.                                 {
  2526.  
  2527.                                     Console.Clear();
  2528.                                     for (int i = 0; i < view11.GetLength(0); i++)
  2529.                                     {
  2530.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  2531.                                         {
  2532.                                             Console.Write(view11[i, j]);
  2533.                                         }
  2534.                                         Console.WriteLine();
  2535.  
  2536.                                     }
  2537.                                     curA = view11;
  2538.  
  2539.  
  2540.                                 }
  2541.                             if (map[userX + 1, userY + 1] == ' ') // проверка буквы г на тупик2
  2542.                             {
  2543.  
  2544.                                 Console.Clear();
  2545.                                 for (int i = 0; i < view12.GetLength(0); i++)
  2546.                                 {
  2547.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  2548.                                     {
  2549.                                         Console.Write(view12[i, j]);
  2550.                                     }
  2551.                                     Console.WriteLine();
  2552.  
  2553.                                 }
  2554.                                 curA = view12;
  2555.  
  2556.  
  2557.                             }
  2558.                             if (map[userX + 1, userY + 1] == ' ' && map[userX - 1, userY + 1] == ' ') // проверка буквы Г туда и обратно)
  2559.                             {
  2560.                                 Console.Clear();
  2561.                                 for (int i = 0; i < view13.GetLength(0); i++)
  2562.                                 {
  2563.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  2564.                                     {
  2565.                                         Console.Write(view13[i, j]);
  2566.                                     }
  2567.                                     Console.WriteLine();
  2568.  
  2569.                                 }
  2570.                                 curA = view13;
  2571.                             }
  2572.                            
  2573.                         }
  2574.                         if (userX == 2 && userY+1 == 11 && x1 == 1)
  2575.                         {
  2576.                             Console.SetCursorPosition(35, 15);
  2577.                             Console.BackgroundColor = ConsoleColor.Blue;
  2578.                             Console.Write("####");
  2579.                             Console.SetCursorPosition(35, 16);
  2580.                             Console.Write("####");
  2581.                             Console.SetCursorPosition(35, 17);
  2582.                             Console.Write("####");
  2583.                             Console.BackgroundColor = ConsoleColor.White;
  2584.  
  2585.                         }
  2586.                         if (userX== 2 && userY+1 == 5 && x2 == 1)
  2587.                         {
  2588.                             Console.SetCursorPosition(35, 15);
  2589.                             Console.BackgroundColor = ConsoleColor.Blue;
  2590.                             Console.Write("####");
  2591.                             Console.SetCursorPosition(35, 16);
  2592.                             Console.Write("####");
  2593.                             Console.SetCursorPosition(35, 17);
  2594.                             Console.Write("####");
  2595.                             Console.BackgroundColor = ConsoleColor.White;
  2596.  
  2597.                         }
  2598.                         if (userX== 5 && userY+1 == 3 && x3 == 1)
  2599.                         {
  2600.                             Console.SetCursorPosition(35, 15);
  2601.                             Console.BackgroundColor = ConsoleColor.Blue;
  2602.                             Console.Write("####");
  2603.                             Console.SetCursorPosition(35, 16);
  2604.                             Console.Write("####");
  2605.                             Console.SetCursorPosition(35, 17);
  2606.                             Console.Write("####");
  2607.                             Console.BackgroundColor = ConsoleColor.White;
  2608.  
  2609.                         }
  2610.                         if (userX == 11 && userY+1 == 5 && x4 == 1)
  2611.                         {
  2612.                             Console.SetCursorPosition(35, 15);
  2613.                             Console.BackgroundColor = ConsoleColor.Blue;
  2614.                             Console.Write("####");
  2615.                             Console.SetCursorPosition(35, 16);
  2616.                             Console.Write("####");
  2617.                             Console.SetCursorPosition(35, 17);
  2618.                             Console.Write("####");
  2619.                             Console.BackgroundColor = ConsoleColor.White;
  2620.  
  2621.                         }
  2622.                         if (userX == 15 && userY+1 == 2 && x5 == 1)
  2623.                         {
  2624.                             Console.SetCursorPosition(35, 15);
  2625.                             Console.BackgroundColor = ConsoleColor.Blue;
  2626.                             Console.Write("####");
  2627.                             Console.SetCursorPosition(35, 16);
  2628.                             Console.Write("####");
  2629.                             Console.SetCursorPosition(35, 17);
  2630.                             Console.Write("####");
  2631.                             Console.BackgroundColor = ConsoleColor.White;
  2632.  
  2633.                         }
  2634.                         if (userX== 15 && userY+1 == 9 && x6 == 1)
  2635.                         {
  2636.                             Console.SetCursorPosition(35, 15);
  2637.                             Console.BackgroundColor = ConsoleColor.Blue;
  2638.                             Console.Write("####");
  2639.                             Console.SetCursorPosition(35, 16);
  2640.                             Console.Write("####");
  2641.                             Console.SetCursorPosition(35, 17);
  2642.                             Console.Write("####");
  2643.                             Console.BackgroundColor = ConsoleColor.White;
  2644.  
  2645.                         }
  2646.  
  2647.                     }
  2648.                     if (naprav == 4) // проверяет направление НАВЕРХ userx -1
  2649.                     {
  2650.                         if (map[userX - 1, userY] != '#')
  2651.                         {
  2652.                             userX--;
  2653.  
  2654.                             if (map[userX - 2, userY] == '#' && map[userX - 1, userY - 1] == '#' && map[userX - 1, userY + 1] == '#') // проверка буквы г на тупик 2
  2655.                             {
  2656.                                 Console.Clear();
  2657.                                 for (int i = 0; i < view1.GetLength(0); i++)
  2658.                                 {
  2659.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  2660.                                     {
  2661.                                         Console.Write(view1[i, j]);
  2662.                                     }
  2663.                                     Console.WriteLine();
  2664.  
  2665.                                 }
  2666.                                 curA = view1;
  2667.                             }
  2668.                             if (map[userX - 1, userY] == '#')
  2669.                             {
  2670.                                 Console.Clear();
  2671.                                 for (int i = 0; i < view2.GetLength(0); i++)
  2672.                                 {
  2673.                                     for (int j = 0; j < view2.GetLength(1) - 1; j++)
  2674.                                     {
  2675.                                         Console.Write(view2[i, j]);
  2676.                                     }
  2677.                                     Console.WriteLine();
  2678.                                 }
  2679.                                 curA = view2;
  2680.                             }
  2681.  
  2682.                             //отлично
  2683.                             if (map[userX - 1, userY] == ' ' && map[userX - 2, userY] == ' ')  //проверяет два следующий блока
  2684.                             {
  2685.                                 Console.Clear();
  2686.                                 for (int i = 0; i < view3.GetLength(0); i++)
  2687.                                 {
  2688.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  2689.                                     {
  2690.                                         Console.Write(view3[i, j]);
  2691.                                     }
  2692.                                     Console.WriteLine();
  2693.                                 }
  2694.                                 curA = view3;
  2695.  
  2696.                             }
  2697.                             if (map[userX - 1, userY] == ' ')
  2698.                             {
  2699.                                 if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик1
  2700.                                 {
  2701.  
  2702.                                     Console.Clear();
  2703.                                     for (int i = 0; i < view11.GetLength(0); i++)
  2704.                                     {
  2705.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  2706.                                         {
  2707.                                             Console.Write(view11[i, j]);
  2708.                                         }
  2709.                                         Console.WriteLine();
  2710.  
  2711.                                     }
  2712.                                     curA = view11;
  2713.  
  2714.  
  2715.                                 }
  2716.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик2
  2717.                                 {
  2718.  
  2719.                                     Console.Clear();
  2720.                                     for (int i = 0; i < view12.GetLength(0); i++)
  2721.                                     {
  2722.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  2723.                                         {
  2724.                                             Console.Write(view12[i, j]);
  2725.                                         }
  2726.                                         Console.WriteLine();
  2727.  
  2728.                                     }
  2729.                                     curA = view12;
  2730.  
  2731.  
  2732.                                 }
  2733.  
  2734.  
  2735.                             }
  2736.                             if (map[userX - 2, userY] == '#' && map[userX - 1, userY - 1] == '#') // проверка буквы г на тупик1
  2737.                                 if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик1
  2738.                                 {
  2739.  
  2740.                                     Console.Clear();
  2741.                                     for (int i = 0; i < view11.GetLength(0); i++)
  2742.                                     {
  2743.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  2744.                                         {
  2745.                                             Console.Write(view11[i, j]);
  2746.                                         }
  2747.                                         Console.WriteLine();
  2748.  
  2749.                                     }
  2750.                                     curA = view11;
  2751.  
  2752.  
  2753.                                 }
  2754.                             if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик2
  2755.                             {
  2756.  
  2757.                                 Console.Clear();
  2758.                                 for (int i = 0; i < view12.GetLength(0); i++)
  2759.                                 {
  2760.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  2761.                                     {
  2762.                                         Console.Write(view12[i, j]);
  2763.                                     }
  2764.                                     Console.WriteLine();
  2765.  
  2766.                                 }
  2767.                                 curA = view12;
  2768.  
  2769.  
  2770.                             }
  2771.                             if (map[userX - 1, userY - 1] == ' ' && map[userX - 1, userY + 1] == ' ') // проверка буквы Г туда и обратно)
  2772.                             {
  2773.                                 Console.Clear();
  2774.                                 for (int i = 0; i < view13.GetLength(0); i++)
  2775.                                 {
  2776.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  2777.                                     {
  2778.                                         Console.Write(view13[i, j]);
  2779.                                     }
  2780.                                     Console.WriteLine();
  2781.  
  2782.                                 }
  2783.                                 curA = view13;
  2784.                             }
  2785.                            
  2786.                         }
  2787.                         if (userX - 1 == 2 && userY == 11 && x1 == 1)
  2788.                         {
  2789.                             Console.SetCursorPosition(35, 15);
  2790.                             Console.BackgroundColor = ConsoleColor.Blue;
  2791.                             Console.Write("####");
  2792.                             Console.SetCursorPosition(35, 16);
  2793.                             Console.Write("####");
  2794.                             Console.SetCursorPosition(35, 17);
  2795.                             Console.Write("####");
  2796.                             Console.BackgroundColor = ConsoleColor.White;
  2797.  
  2798.                         }
  2799.                         if (userX - 1 == 2 && userY == 5 && x2 == 1)
  2800.                         {
  2801.                             Console.SetCursorPosition(35, 15);
  2802.                             Console.BackgroundColor = ConsoleColor.Blue;
  2803.                             Console.Write("####");
  2804.                             Console.SetCursorPosition(35, 16);
  2805.                             Console.Write("####");
  2806.                             Console.SetCursorPosition(35, 17);
  2807.                             Console.Write("####");
  2808.                             Console.BackgroundColor = ConsoleColor.White;
  2809.  
  2810.                         }
  2811.                         if (userX - 1 == 5 && userY == 3 && x3 == 1)
  2812.                         {
  2813.                             Console.SetCursorPosition(35, 15);
  2814.                             Console.BackgroundColor = ConsoleColor.Blue;
  2815.                             Console.Write("####");
  2816.                             Console.SetCursorPosition(35, 16);
  2817.                             Console.Write("####");
  2818.                             Console.SetCursorPosition(35, 17);
  2819.                             Console.Write("####");
  2820.                             Console.BackgroundColor = ConsoleColor.White;
  2821.  
  2822.                         }
  2823.                         if (userX - 1 == 11 && userY == 5 && x4 == 1)
  2824.                         {
  2825.                             Console.SetCursorPosition(35, 15);
  2826.                             Console.BackgroundColor = ConsoleColor.Blue;
  2827.                             Console.Write("####");
  2828.                             Console.SetCursorPosition(35, 16);
  2829.                             Console.Write("####");
  2830.                             Console.SetCursorPosition(35, 17);
  2831.                             Console.Write("####");
  2832.                             Console.BackgroundColor = ConsoleColor.White;
  2833.  
  2834.                         }
  2835.                         if (userX - 1 == 15 && userY == 2 && x5 == 1)
  2836.                         {
  2837.                             Console.SetCursorPosition(35, 15);
  2838.                             Console.BackgroundColor = ConsoleColor.Blue;
  2839.                             Console.Write("####");
  2840.                             Console.SetCursorPosition(35, 16);
  2841.                             Console.Write("####");
  2842.                             Console.SetCursorPosition(35, 17);
  2843.                             Console.Write("####");
  2844.                             Console.BackgroundColor = ConsoleColor.White;
  2845.  
  2846.                         }
  2847.                         if (userX - 1 == 15 && userY == 9 && x6 == 1)
  2848.                         {
  2849.                             Console.SetCursorPosition(35, 15);
  2850.                             Console.BackgroundColor = ConsoleColor.Blue;
  2851.                             Console.Write("####");
  2852.                             Console.SetCursorPosition(35, 16);
  2853.                             Console.Write("####");
  2854.                             Console.SetCursorPosition(35, 17);
  2855.                             Console.Write("####");
  2856.                             Console.BackgroundColor = ConsoleColor.White;
  2857.  
  2858.                         }
  2859.                     }
  2860.                     if (naprav == 5)
  2861.                     {
  2862.                         if (map[userX, userY - 1] != '#')
  2863.                         {
  2864.                             userY--;
  2865.  
  2866.                             if (map[userX, userY - 2] == '#' && map[userX - 1, userY - 1] == '#' && map[userX + 1, userY - 1] == '#') // проверка буквы г на тупик 2
  2867.                             {
  2868.                                 Console.Clear();
  2869.                                 for (int i = 0; i < view1.GetLength(0); i++)
  2870.                                 {
  2871.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  2872.                                     {
  2873.                                         Console.Write(view1[i, j]);
  2874.                                     }
  2875.                                     Console.WriteLine();
  2876.  
  2877.                                 }
  2878.                                 curA = view1;
  2879.                             }
  2880.                             if (map[userX, userY - 1] == '#')
  2881.                             {
  2882.                                 Console.Clear();
  2883.                                 for (int i = 0; i < view2.GetLength(0); i++)
  2884.                                 {
  2885.                                     for (int j = 0; j < view2.GetLength(1) - 1; j++)
  2886.                                     {
  2887.                                         Console.Write(view2[i, j]);
  2888.                                     }
  2889.                                     Console.WriteLine();
  2890.                                 }
  2891.                                 curA = view2;
  2892.                             }
  2893.  
  2894.                             //отлично
  2895.                             if (map[userX, userY - 1] == ' ' && map[userX, userY - 2] == ' ')  //проверяет два следующий блока
  2896.                             {
  2897.                                 Console.Clear();
  2898.                                 for (int i = 0; i < view3.GetLength(0); i++)
  2899.                                 {
  2900.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  2901.                                     {
  2902.                                         Console.Write(view3[i, j]);
  2903.                                     }
  2904.                                     Console.WriteLine();
  2905.                                 }
  2906.                                 curA = view3;
  2907.  
  2908.                             }
  2909.                             if (map[userX, userY - 1] == ' ')
  2910.                             {
  2911.                                 if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик1
  2912.                                 {
  2913.  
  2914.                                     Console.Clear();
  2915.                                     for (int i = 0; i < view11.GetLength(0); i++)
  2916.                                     {
  2917.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  2918.                                         {
  2919.                                             Console.Write(view11[i, j]);
  2920.                                         }
  2921.                                         Console.WriteLine();
  2922.  
  2923.                                     }
  2924.                                     curA = view11;
  2925.  
  2926.  
  2927.                                 }
  2928.                                 if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик2
  2929.                                 {
  2930.  
  2931.                                     Console.Clear();
  2932.                                     for (int i = 0; i < view12.GetLength(0); i++)
  2933.                                     {
  2934.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  2935.                                         {
  2936.                                             Console.Write(view12[i, j]);
  2937.                                         }
  2938.                                         Console.WriteLine();
  2939.  
  2940.                                     }
  2941.                                     curA = view12;
  2942.  
  2943.  
  2944.                                 }
  2945.  
  2946.  
  2947.                             }
  2948.                             if (map[userX, userY - 2] == '#' && map[userX - 1, userY - 1] == '#') // проверка буквы г на тупик1
  2949.                                 if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик1
  2950.                                 {
  2951.  
  2952.                                     Console.Clear();
  2953.                                     for (int i = 0; i < view11.GetLength(0); i++)
  2954.                                     {
  2955.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  2956.                                         {
  2957.                                             Console.Write(view11[i, j]);
  2958.                                         }
  2959.                                         Console.WriteLine();
  2960.  
  2961.                                     }
  2962.                                     curA = view11;
  2963.  
  2964.  
  2965.                                 }
  2966.  
  2967.  
  2968.                             if (map[userX - 1, userY - 1] == ' ') // проверка буквы г на тупик2
  2969.                             {
  2970.  
  2971.                                 Console.Clear();
  2972.                                 for (int i = 0; i < view12.GetLength(0); i++)
  2973.                                 {
  2974.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  2975.                                     {
  2976.                                         Console.Write(view12[i, j]);
  2977.                                     }
  2978.                                     Console.WriteLine();
  2979.  
  2980.                                 }
  2981.                                 curA = view12;
  2982.  
  2983.  
  2984.                             }
  2985.                             if (map[userX - 1, userY - 1] == ' ' && map[userX + 1, userY - 1] == ' ') // проверка буквы Г туда и обратно)
  2986.                             {
  2987.                                 Console.Clear();
  2988.                                 for (int i = 0; i < view13.GetLength(0); i++)
  2989.                                 {
  2990.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  2991.                                     {
  2992.                                         Console.Write(view13[i, j]);
  2993.                                     }
  2994.                                     Console.WriteLine();
  2995.  
  2996.                                 }
  2997.                                 curA = view13;
  2998.                             }
  2999.                            
  3000.  
  3001.                         }
  3002.                         if (userX == 2 && userY - 1 == 11 && x1 == 1)
  3003.                         {
  3004.                             Console.SetCursorPosition(35, 15);
  3005.                             Console.BackgroundColor = ConsoleColor.Blue;
  3006.                             Console.Write("####");
  3007.                             Console.SetCursorPosition(35, 16);
  3008.                             Console.Write("####");
  3009.                             Console.SetCursorPosition(35, 17);
  3010.                             Console.Write("####");
  3011.                             Console.BackgroundColor = ConsoleColor.White;
  3012.  
  3013.                         }
  3014.                         if (userX == 2 && userY - 1 == 5 && x2 == 1)
  3015.                         {
  3016.                             Console.SetCursorPosition(35, 15);
  3017.                             Console.BackgroundColor = ConsoleColor.Blue;
  3018.                             Console.Write("####");
  3019.                             Console.SetCursorPosition(35, 16);
  3020.                             Console.Write("####");
  3021.                             Console.SetCursorPosition(35, 17);
  3022.                             Console.Write("####");
  3023.                             Console.BackgroundColor = ConsoleColor.White;
  3024.  
  3025.                         }
  3026.                         if (userX == 5 && userY - 1 == 3 && x3 == 1)
  3027.                         {
  3028.                             Console.SetCursorPosition(35, 15);
  3029.                             Console.BackgroundColor = ConsoleColor.Blue;
  3030.                             Console.Write("####");
  3031.                             Console.SetCursorPosition(35, 16);
  3032.                             Console.Write("####");
  3033.                             Console.SetCursorPosition(35, 17);
  3034.                             Console.Write("####");
  3035.                             Console.BackgroundColor = ConsoleColor.White;
  3036.  
  3037.                         }
  3038.                         if (userX == 11 && userY - 1 == 5 && x4 == 1)
  3039.                         {
  3040.                             Console.SetCursorPosition(35, 15);
  3041.                             Console.BackgroundColor = ConsoleColor.Blue;
  3042.                             Console.Write("####");
  3043.                             Console.SetCursorPosition(35, 16);
  3044.                             Console.Write("####");
  3045.                             Console.SetCursorPosition(35, 17);
  3046.                             Console.Write("####");
  3047.                             Console.BackgroundColor = ConsoleColor.White;
  3048.  
  3049.                         }
  3050.                         if (userX == 15 && userY - 1 == 2 && x5 == 1)
  3051.                         {
  3052.                             Console.SetCursorPosition(35, 15);
  3053.                             Console.BackgroundColor = ConsoleColor.Blue;
  3054.                             Console.Write("####");
  3055.                             Console.SetCursorPosition(35, 16);
  3056.                             Console.Write("####");
  3057.                             Console.SetCursorPosition(35, 17);
  3058.                             Console.Write("####");
  3059.                             Console.BackgroundColor = ConsoleColor.White;
  3060.  
  3061.                         }
  3062.                         if (userX == 15 && userY - 1 == 9 && x6 == 1)
  3063.                         {
  3064.                             Console.SetCursorPosition(35, 15);
  3065.                             Console.BackgroundColor = ConsoleColor.Blue;
  3066.                             Console.Write("####");
  3067.                             Console.SetCursorPosition(35, 16);
  3068.                             Console.Write("####");
  3069.                             Console.SetCursorPosition(35, 17);
  3070.                             Console.Write("####");
  3071.                             Console.BackgroundColor = ConsoleColor.White;
  3072.  
  3073.                         }
  3074.                     }
  3075.                     if (naprav == 6)
  3076.                     {
  3077.                         if (map[userX + 1, userY] != '#')
  3078.                         {
  3079.                             userX++;
  3080.  
  3081.                             if (map[userX + 2, userY] == '#' && map[userX + 1, userY - 1] == '#' && map[userX + 1, userY + 1] == '#') // проверка буквы г на тупик 2
  3082.                             {
  3083.                                 Console.Clear();
  3084.                                 for (int i = 0; i < view1.GetLength(0); i++)
  3085.                                 {
  3086.                                     for (int j = 0; j < view1.GetLength(1) - 1; j++)
  3087.                                     {
  3088.                                         Console.Write(view1[i, j]);
  3089.                                     }
  3090.                                     Console.WriteLine();
  3091.  
  3092.                                 }
  3093.                                 curA = view1;
  3094.                             }
  3095.                             if (map[userX + 1, userY] == '#')
  3096.                             {
  3097.                                 Console.Clear();
  3098.                                 for (int i = 0; i < view2.GetLength(0); i++)
  3099.                                 {
  3100.                                     for (int j = 0; j < view2.GetLength(1) - 1; j++)
  3101.                                     {
  3102.                                         Console.Write(view2[i, j]);
  3103.                                     }
  3104.                                     Console.WriteLine();
  3105.                                 }
  3106.                                 curA = view2;
  3107.                             }
  3108.  
  3109.                             //отлично
  3110.                             if (map[userX + 1, userY] == ' ' && map[userX + 2, userY] == ' ')  //проверяет два следующий блока
  3111.                             {
  3112.                                 Console.Clear();
  3113.                                 for (int i = 0; i < view3.GetLength(0); i++)
  3114.                                 {
  3115.                                     for (int j = 0; j < view3.GetLength(1) - 1; j++)
  3116.                                     {
  3117.                                         Console.Write(view3[i, j]);
  3118.                                     }
  3119.                                     Console.WriteLine();
  3120.                                 }
  3121.                                 curA = view3;
  3122.  
  3123.                             }
  3124.                             if (map[userX + 1, userY] == ' ')
  3125.                             {
  3126.                                 if (map[userX + 1, userY + 1] == ' ') // проверка буквы г на тупик1
  3127.                                 {
  3128.  
  3129.                                     Console.Clear();
  3130.                                     for (int i = 0; i < view11.GetLength(0); i++)
  3131.                                     {
  3132.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  3133.                                         {
  3134.                                             Console.Write(view11[i, j]);
  3135.                                         }
  3136.                                         Console.WriteLine();
  3137.  
  3138.                                     }
  3139.                                     curA = view11;
  3140.  
  3141.  
  3142.                                 }
  3143.                                 if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик2
  3144.                                 {
  3145.  
  3146.                                     Console.Clear();
  3147.                                     for (int i = 0; i < view12.GetLength(0); i++)
  3148.                                     {
  3149.                                         for (int j = 0; j < view12.GetLength(1) - 1; j++)
  3150.                                         {
  3151.                                             Console.Write(view12[i, j]);
  3152.                                         }
  3153.                                         Console.WriteLine();
  3154.  
  3155.                                     }
  3156.                                     curA = view12;
  3157.  
  3158.  
  3159.                                 }
  3160.  
  3161.  
  3162.                             }
  3163.                             if (map[userX + 2, userY] == '#' && map[userX + 1, userY - 1] == '#') // проверка буквы г на тупик1
  3164.                                 if (map[userX - 1, userY + 1] == ' ') // проверка буквы г на тупик1
  3165.                                 {
  3166.  
  3167.                                     Console.Clear();
  3168.                                     for (int i = 0; i < view11.GetLength(0); i++)
  3169.                                     {
  3170.                                         for (int j = 0; j < view11.GetLength(1) - 1; j++)
  3171.                                         {
  3172.                                             Console.Write(view11[i, j]);
  3173.                                         }
  3174.                                         Console.WriteLine();
  3175.  
  3176.                                     }
  3177.                                     curA = view11;
  3178.  
  3179.  
  3180.                                 }
  3181.  
  3182.  
  3183.                             if (map[userX + 1, userY - 1] == ' ') // проверка буквы г на тупик2
  3184.                             {
  3185.  
  3186.                                 Console.Clear();
  3187.                                 for (int i = 0; i < view12.GetLength(0); i++)
  3188.                                 {
  3189.                                     for (int j = 0; j < view12.GetLength(1) - 1; j++)
  3190.                                     {
  3191.                                         Console.Write(view12[i, j]);
  3192.                                     }
  3193.                                     Console.WriteLine();
  3194.  
  3195.                                 }
  3196.                                 curA = view12;
  3197.  
  3198.  
  3199.                             }
  3200.                             if (map[userX + 1, userY - 1] == ' ' && map[userX + 1, userY + 1] == ' ') // проверка буквы Г туда и обратно)
  3201.                             {
  3202.                                 Console.Clear();
  3203.                                 for (int i = 0; i < view13.GetLength(0); i++)
  3204.                                 {
  3205.                                     for (int j = 0; j < view13.GetLength(1) - 1; j++)
  3206.                                     {
  3207.                                         Console.Write(view13[i, j]);
  3208.                                     }
  3209.                                     Console.WriteLine();
  3210.  
  3211.                                 }
  3212.                                 curA = view13;
  3213.                             }
  3214.                            
  3215.  
  3216.                         }
  3217.                         if (userX + 1 == 2 && userY == 11 && x1 == 1)
  3218.                         {
  3219.                             Console.SetCursorPosition(35, 15);
  3220.                             Console.BackgroundColor = ConsoleColor.Blue;
  3221.                             Console.Write("####");
  3222.                             Console.SetCursorPosition(35, 16);
  3223.                             Console.Write("####");
  3224.                             Console.SetCursorPosition(35, 17);
  3225.                             Console.Write("####");
  3226.                             Console.BackgroundColor = ConsoleColor.White;
  3227.  
  3228.                         }
  3229.                         if (userX + 1 == 2 && userY == 5 && x2 == 1)
  3230.                         {
  3231.                             Console.SetCursorPosition(35, 15);
  3232.                             Console.BackgroundColor = ConsoleColor.Blue;
  3233.                             Console.Write("####");
  3234.                             Console.SetCursorPosition(35, 16);
  3235.                             Console.Write("####");
  3236.                             Console.SetCursorPosition(35, 17);
  3237.                             Console.Write("####");
  3238.                             Console.BackgroundColor = ConsoleColor.White;
  3239.  
  3240.                         }
  3241.                         if (userX + 1 == 5 && userY == 3 && x3 == 1)
  3242.                         {
  3243.                             Console.SetCursorPosition(35, 15);
  3244.                             Console.BackgroundColor = ConsoleColor.Blue;
  3245.                             Console.Write("####");
  3246.                             Console.SetCursorPosition(35, 16);
  3247.                             Console.Write("####");
  3248.                             Console.SetCursorPosition(35, 17);
  3249.                             Console.Write("####");
  3250.                             Console.BackgroundColor = ConsoleColor.White;
  3251.  
  3252.                         }
  3253.                         if (userX + 1 == 11 && userY == 5 && x4 == 1)
  3254.                         {
  3255.                             Console.SetCursorPosition(35, 15);
  3256.                             Console.BackgroundColor = ConsoleColor.Blue;
  3257.                             Console.Write("####");
  3258.                             Console.SetCursorPosition(35, 16);
  3259.                             Console.Write("####");
  3260.                             Console.SetCursorPosition(35, 17);
  3261.                             Console.Write("####");
  3262.                             Console.BackgroundColor = ConsoleColor.White;
  3263.  
  3264.                         }
  3265.                         if (userX + 1 == 15 && userY == 2 && x5 == 1)
  3266.                         {
  3267.                             Console.SetCursorPosition(35, 15);
  3268.                             Console.BackgroundColor = ConsoleColor.Blue;
  3269.                             Console.Write("####");
  3270.                             Console.SetCursorPosition(35, 16);
  3271.                             Console.Write("####");
  3272.                             Console.SetCursorPosition(35, 17);
  3273.                             Console.Write("####");
  3274.                             Console.BackgroundColor = ConsoleColor.White;
  3275.  
  3276.                         }
  3277.                         if (userX + 1 == 15 && userY == 9 && x6 == 1)
  3278.                         {
  3279.                             Console.SetCursorPosition(35, 15);
  3280.                             Console.BackgroundColor = ConsoleColor.Blue;
  3281.                             Console.Write("####");
  3282.                             Console.SetCursorPosition(35, 16);
  3283.                             Console.Write("####");
  3284.                             Console.SetCursorPosition(35, 17);
  3285.                             Console.Write("####");
  3286.                             Console.BackgroundColor = ConsoleColor.White;
  3287.  
  3288.                         }
  3289.                     }
  3290.  
  3291.  
  3292.  
  3293.  
  3294.                 }
  3295.                 switch (charKey.Key)
  3296.                 {
  3297.                     case ConsoleKey.Escape:
  3298.                         Console.Clear();
  3299.                         for (int i = 0; i < curA.GetLength(0); i++)
  3300.                         {
  3301.                             for (int j = 0; j < curA.GetLength(1) - 1; j++)
  3302.                             {
  3303.                                 Console.Write(curA[i, j]);
  3304.                             }
  3305.                             Console.WriteLine();
  3306.  
  3307.  
  3308.  
  3309.                         }
  3310.                         perna = 0;
  3311.                         break;
  3312.                 }
  3313.                 if (userX == 2 && userY == 11 && x1 == 1)
  3314.                 {
  3315.                     x1 = 0;
  3316.                    
  3317.                 }
  3318.                 //сделан
  3319.                 if (userX == 2 && userY == 5 && x2 == 1)
  3320.                 {
  3321.                     x2 = 0;
  3322.                 }
  3323.                 //сделан
  3324.                 if (userX == 5 && userY == 3 && x3 == 1)
  3325.                 {
  3326.                     x3 = 0;
  3327.                 }
  3328.  
  3329.                 //сделан
  3330.  
  3331.                 if (userX == 11 && userY == 5 && x4 == 1)
  3332.                 {
  3333.                     x4 = 0;
  3334.                 }
  3335.                 //сделан
  3336.                 if (userX == 15 && userY == 2 && x5 == 1)
  3337.                 {
  3338.                     x5 = 0;
  3339.                 }
  3340.                 //сделан
  3341.                 if (userX == 15 && userY == 9 && x6 == 1)
  3342.                 {
  3343.                     x6 = 0;
  3344.                 }
  3345.                 //сделан
  3346.                 if (x1 == 0 && x2 == 0 && x3 == 0 && x4 == 0 && x5 == 0 && x6 == 0 && userX==16 && userY==12)
  3347.                 {
  3348.                     break;
  3349.                 }
  3350.                
  3351.  
  3352.  
  3353.  
  3354.             }
  3355.             Console.Clear();
  3356.             Console.SetCursorPosition(15, 15);
  3357.             Console.Write("Вы победили! вы собрали все кристаллы.");
  3358.             Console.WriteLine();
  3359.             Console.ReadLine();
  3360.  
  3361.  
  3362.  
  3363.         }
  3364.  
  3365.  
  3366.     }
  3367. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement