|
|
@ -84,7 +84,7 @@ namespace Models.Game
|
|
|
|
|
|
|
|
|
|
|
|
public Map UsedMap { get; private set; }
|
|
|
|
public Map UsedMap { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Dice Dice1 { get; private set; }
|
|
|
|
public Dice Dice1 { get; private set;}
|
|
|
|
public Dice Dice2 { get; private set; }
|
|
|
|
public Dice Dice2 { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
public int Turn { get; private set; }
|
|
|
|
public int Turn { get; private set; }
|
|
|
@ -176,14 +176,14 @@ namespace Models.Game
|
|
|
|
BestScores = new ObservableCollection<BestScore>();
|
|
|
|
BestScores = new ObservableCollection<BestScore>();
|
|
|
|
|
|
|
|
|
|
|
|
GameRules = new Rules.Rules();
|
|
|
|
GameRules = new Rules.Rules();
|
|
|
|
|
|
|
|
UsedMap = new Map("test");
|
|
|
|
IsRunning = false;
|
|
|
|
IsRunning = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// Rolls all the dice.
|
|
|
|
/// Rolls all the dice.
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
private void RollAllDice()
|
|
|
|
public void RollAllDice()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Dice1.Roll();
|
|
|
|
Dice1.Roll();
|
|
|
|
Dice2.Roll();
|
|
|
|
Dice2.Roll();
|
|
|
@ -347,7 +347,7 @@ namespace Models.Game
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (Turn == 20)
|
|
|
|
if (Turn == 20)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
foreach(var cells in UsedMap.Boards)
|
|
|
|
foreach(var cells in UsedMap.Boards.ToList())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
GameRules.IsZoneValidAndAddToZones(cells, UsedMap);
|
|
|
|
GameRules.IsZoneValidAndAddToZones(cells, UsedMap);
|
|
|
|
AddToRopePath(cells, GameRules.EveryAdjacentCells(cells, UsedMap.Boards.ToList()));
|
|
|
|
AddToRopePath(cells, GameRules.EveryAdjacentCells(cells, UsedMap.Boards.ToList()));
|
|
|
|