|
|
|
@ -1,4 +1,6 @@
|
|
|
|
|
namespace Models.Game
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
|
|
|
|
|
namespace Models.Game
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -19,7 +21,8 @@
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// It is the grid of the possible operation in the game
|
|
|
|
|
/// </summary>
|
|
|
|
|
public List<OperationCell> OperationGrid { get; private set; }
|
|
|
|
|
public ReadOnlyObservableCollection<OperationCell> OperationGrid { get; private set; }
|
|
|
|
|
ObservableCollection<OperationCell> operationGrid = new ObservableCollection<OperationCell>();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// It is a list of a list containing user's rope paths in the current game
|
|
|
|
@ -39,7 +42,8 @@
|
|
|
|
|
{
|
|
|
|
|
Boards = InitializeBoards();
|
|
|
|
|
Background = background;
|
|
|
|
|
OperationGrid = InitializeOperationGrid();
|
|
|
|
|
OperationGrid = new ReadOnlyObservableCollection<OperationCell>(operationGrid);
|
|
|
|
|
InitializeOperationGrid(operationGrid);
|
|
|
|
|
RopePaths = new List<List<Cell>>();
|
|
|
|
|
Zones = new List<List<Cell>>();
|
|
|
|
|
}
|
|
|
|
@ -62,9 +66,8 @@
|
|
|
|
|
/// Initializes the operation grid of the map.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>Return the operation grid</returns>
|
|
|
|
|
private List<OperationCell> InitializeOperationGrid()
|
|
|
|
|
private void InitializeOperationGrid(ObservableCollection<OperationCell>operationGrid)
|
|
|
|
|
{
|
|
|
|
|
var operationGrid = new List<OperationCell>();
|
|
|
|
|
for (int i = 0; i < 5; i++) // 5 operations
|
|
|
|
|
{
|
|
|
|
|
for (int j = 0; j < 4; j++) // 4 cells per operation
|
|
|
|
@ -72,7 +75,6 @@
|
|
|
|
|
operationGrid.Add(new OperationCell(i, j));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return operationGrid;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|