Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Linq;
- using System.Collections.Generic;
- namespace CSharp_Shell
- {
- public static class Program
- {
- public static void Main()
- {
- MapGenerator.Map(12,14,"[]", "[]");
- }
- }
- public class MapGenerator
- {
- public static void Map(int lineCount, int columnCount, string wallChar, string blockChar)
- {
- Console.BackgroundColor = ConsoleColor.Green;
- for(int x=0; x <= lineCount; x++)
- {
- for (int y = 0; y <= columnCount; y++)
- {
- if((x == 0 || x == lineCount) || (y==0 || y==columnCount))
- {
- Instantiate(ConsoleColor.Blue, "[]");
- }
- else if (x %2 ==0 && y % 2 ==0)
- {
- Instantiate(ConsoleColor.Black, "[]");
- }
- else
- {
- Instantiate(ConsoleColor.White, "[]");
- }
- }
- Console.WriteLine();
- }
- }
- public static void ReservedBlocks(int posX, int posY)
- {
- int [,] spawnSpots = new int [,]
- {
- {1,1},
- {1,2},
- {2,1}
- };
- //percorrer o array e retornar bool
- }
- private static void Instantiate(ConsoleColor colorText, string displayText)
- {
- Console.ForegroundColor = colorText;
- Console.Write(displayText);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement