Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static int[,] river =
- {
- {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
- {0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,1,1,1,0,1,1,1,1,1,1,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
- {0,0,0,0,1,1,0,0,0,0,1,1,1,0,0,1,1,1,1,1,0,0,0,1,1,0,0,1,1,1,1,0,1,1,0,0,1,1,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
- {0,0,1,1,1,1,0,0,1,1,0,0,1,1,1,1,0,0,1,1,0,0,1,1,1,0,0,0,1,1,0,0,1,1,1,1,1,1,1,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
- {1,1,1,1,1,1,0,0,0,0,1,1,1,0,0,1,1,1,1,1,0,0,0,1,1,0,0,1,1,1,1,0,1,1,0,0,1,1,0,0},
- {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
- };
- static int[] side = new int[river.GetLength(1)];
- static void IceColor()
- {
- Console.ForegroundColor = ConsoleColor.Cyan;
- Console.BackgroundColor = ConsoleColor.Cyan;
- }
- static void WaterColor()
- {
- Console.ForegroundColor = ConsoleColor.DarkBlue;
- Console.BackgroundColor = ConsoleColor.DarkBlue;
- }
- static void SideColor()
- {
- Console.ForegroundColor = ConsoleColor.DarkGreen;
- Console.BackgroundColor = ConsoleColor.DarkGreen;
- }
- static void DrawRiver()
- {
- for (int row = 0; row < river.GetLength(0); row++)
- {
- for (int col = 0; col < river.GetLength(1); col++)
- {
- if (river[row, col] == 1)
- {
- IceColor();
- Console.Write(river[row, col]);
- }
- else
- {
- WaterColor();
- Console.Write(river[row, col]);
- }
- }
- Console.WriteLine();
- }
- }
- static void DrawSide()
- {
- for (int col = 0; col < side.Length; col++)
- {
- SideColor();
- Console.Write(side[col]);
- }
- Console.WriteLine();
- }
- static void Main()
- {
- DrawSide();
- DrawRiver();
- DrawSide();
- Console.ResetColor();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement