using System.Collections.Generic;
using System.Threading.Tasks;
namespace Oef16_RomanCypher
static void Main(string[] args)
bool[,] mineField = new bool[8, 10];
Random rndGen = new Random();
for (int row = 0; row < mineField.GetLength(0); row++)
for (int col = 0; col < mineField.GetLength(1); col++)
mineField[row, col] = false;
bombRow = rndGen.Next(mineField.GetLength(0));
bombCol = rndGen.Next(mineField.GetLength(1));
if (!mineField[bombRow, bombCol])
mineField[bombRow, bombCol] = true;
Console.Write("Enter a row (1-{0}): ", mineField.GetLength(0));
int.TryParse(Console.ReadLine(), out inputRow);
Console.Write("Enter a column (1-{0}): ", mineField.GetLength(1));
int.TryParse(Console.ReadLine(), out inputCol);
if (inputRow > 0 && inputRow <= mineField.GetLength(0) &&
inputCol > 0 && inputCol <= mineField.GetLength(1))
if (mineField[inputRow - 1, inputCol - 1])
Console.WriteLine("You found a bomb congratulations, you're dead");
Console.WriteLine("You needed {0} tries", numberOfTries);
Console.WriteLine("No bomb, please try again..");
Console.WriteLine("Invalid row or column.. try again");
Console.WriteLine(" 1 2 3 4 5 6 7 8 9 10");
for (int row = 0; row < mineField.GetLength(0); row++)
Console.Write("{0}: ", row + 1);
for (int col = 0; col < mineField.GetLength(1); col++)
Console.ForegroundColor = ConsoleColor.Red;
Console.ForegroundColor = ConsoleColor.White;
Console.Write("Press any key to continue...");