|
|
|
@ -31,9 +31,87 @@ public class Map
|
|
|
|
|
public Map(string background)
|
|
|
|
|
{
|
|
|
|
|
Boards = new List<Cell>();
|
|
|
|
|
Boards = InitializeBoards();
|
|
|
|
|
Background = background;
|
|
|
|
|
OperationGrid = new List<OperationCell>();
|
|
|
|
|
//RopePaths = new List<List<Cell>>();
|
|
|
|
|
RopePaths = new List<List<Cell>>();
|
|
|
|
|
Zones = new List<List<Cell>>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static List<Cell> InitializeBoards()
|
|
|
|
|
{
|
|
|
|
|
Cell pos01 = new Cell(0, 0);
|
|
|
|
|
Cell pos02 = new Cell(1, 0);
|
|
|
|
|
Cell pos03 = new Cell(2, 0);
|
|
|
|
|
Cell pos04 = new Cell(3, 0);
|
|
|
|
|
Cell pos05 = new Cell(4, 0);
|
|
|
|
|
|
|
|
|
|
Cell pos11 = new Cell(0, 1);
|
|
|
|
|
Cell pos12 = new Cell(1, 1);
|
|
|
|
|
Cell pos13 = new Cell(2, 1);
|
|
|
|
|
Cell pos14 = new Cell(3, 1);
|
|
|
|
|
Cell pos15 = new Cell(4, 1);
|
|
|
|
|
|
|
|
|
|
Cell pos21 = new Cell(0, 2);
|
|
|
|
|
Cell pos22 = new Cell(1, 2);
|
|
|
|
|
Cell pos23 = new Cell(2, 2);
|
|
|
|
|
Cell pos24 = new Cell(3, 2);
|
|
|
|
|
Cell pos25 = new Cell(4, 2);
|
|
|
|
|
|
|
|
|
|
Cell pos31 = new Cell(0, 3);
|
|
|
|
|
Cell pos32 = new Cell(1, 3);
|
|
|
|
|
Cell pos33 = new Cell(2, 3);
|
|
|
|
|
Cell pos34 = new Cell(3, 3);
|
|
|
|
|
Cell pos35 = new Cell(4, 3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Cell> list = new List<Cell>();
|
|
|
|
|
list.Add(pos01);
|
|
|
|
|
list.Add(pos02);
|
|
|
|
|
list.Add(pos03);
|
|
|
|
|
list.Add(pos04);
|
|
|
|
|
list.Add(pos05);
|
|
|
|
|
|
|
|
|
|
list.Add(pos11);
|
|
|
|
|
list.Add(pos12);
|
|
|
|
|
list.Add(pos13);
|
|
|
|
|
list.Add(pos14);
|
|
|
|
|
list.Add(pos15);
|
|
|
|
|
|
|
|
|
|
list.Add(pos21);
|
|
|
|
|
list.Add(pos22);
|
|
|
|
|
list.Add(pos23);
|
|
|
|
|
list.Add(pos24);
|
|
|
|
|
list.Add(pos25);
|
|
|
|
|
|
|
|
|
|
list.Add(pos31);
|
|
|
|
|
list.Add(pos32);
|
|
|
|
|
list.Add(pos33);
|
|
|
|
|
list.Add(pos34);
|
|
|
|
|
list.Add(pos35);
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void DisplayBoards()
|
|
|
|
|
{
|
|
|
|
|
int cpt = 0;
|
|
|
|
|
for (int i = 0; i < Boards.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
Console.Write(" | ");
|
|
|
|
|
Console.Write(Boards[i].Value);
|
|
|
|
|
cpt++;
|
|
|
|
|
if (cpt % 5 == 0) Console.Write(" |\n");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Cell PlayerChoiceOfPosition()
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Enter the position of the cell you want to play");
|
|
|
|
|
Console.WriteLine("Enter the row number");
|
|
|
|
|
int row = Convert.ToInt32(Console.ReadLine());
|
|
|
|
|
Console.WriteLine("Enter the column number");
|
|
|
|
|
int column = Convert.ToInt32(Console.ReadLine());
|
|
|
|
|
return new Cell(row, column);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|