Modification de Game.cs

pull/46/head
Lucas DUFLOT 1 year ago
parent 95e45780fb
commit 0593649450

@ -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)
{
}
}
}

@ -22,7 +22,7 @@ public class Player
public Operation ChooseOperation()
{
return Operation.LOWER
return Operation.LOWER;
}
}

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Models.Game
{
public class RopesZones
{
public List<List<Cell>>? RopeZone { get; set; }
}
}
Loading…
Cancel
Save