|
|
|
@ -17,6 +17,8 @@ namespace Models.Game
|
|
|
|
|
|
|
|
|
|
public int Turn { get; set; }
|
|
|
|
|
|
|
|
|
|
public Rules.Rules rules { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Game(Player player,Map map)
|
|
|
|
|
{
|
|
|
|
@ -25,6 +27,7 @@ namespace Models.Game
|
|
|
|
|
De1 = new De();
|
|
|
|
|
De2 = new De(1);
|
|
|
|
|
Turn = 0;
|
|
|
|
|
rules = new Rules.Rules();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ThrowDice()
|
|
|
|
@ -33,7 +36,7 @@ namespace Models.Game
|
|
|
|
|
De2.Lancer();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int ChooseOperation(Operation o)
|
|
|
|
|
public int ResultOperation(Operation o)
|
|
|
|
|
{
|
|
|
|
|
switch (o)
|
|
|
|
|
{
|
|
|
|
@ -67,5 +70,27 @@ namespace Models.Game
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void PlaceResult (Cell playerChoice,int result)
|
|
|
|
|
{
|
|
|
|
|
if (Turn == 1)
|
|
|
|
|
{
|
|
|
|
|
playerChoice.Value = result;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if(rules.NearCell(playerChoice,NameMap.Cells))
|
|
|
|
|
{
|
|
|
|
|
playerChoice.Value = result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AddRopeZone(Cell playerChoice,RopesZones list)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|