Changement de la méthode AddToRopePath en enlever le second paramètre, qui était inutilisé

pull/112/head
Remi NEVEU 11 months ago
parent d8962f4cb1
commit 3104b66a39

@ -413,7 +413,7 @@ namespace Models.Game
/// </summary>
/// <param name="playerChoice"></param>
/// <param name="adjacentes"></param>
private void AddToRopePath(Cell playerChoice,List<Cell> board)
private void AddToRopePath(Cell playerChoice)
{
if(Turn==1) return;
@ -565,7 +565,7 @@ namespace Models.Game
}
GameRules.IsZoneValidAndAddToZones(cell, UsedMap);
AddToRopePath(cell, GameRules.EveryAdjacentCells(cell, UsedMap.Boards.ToList()));
AddToRopePath(cell);
CellChosen?.Invoke(this, new CellChosenEventArgs(cell, result));
return true;
}

@ -418,7 +418,7 @@ public class GameTests
foreach (var cells in _game.UsedMap.Boards.ToList())
{
methodInfo.Invoke(_game, new object[] { cells, _game.UsedMap.Boards.ToList() });
methodInfo.Invoke(_game, new object[] { cells });
}
_game.PutPenaltyForLostCells(_game.UsedMap.Boards);
@ -586,13 +586,13 @@ public class GameTests
_game.UsedMap.Boards[10].Valid = true;
_game.UsedMap.Boards[7].Value = 5; //7 + 2 = 9
methodInfo.Invoke(_game, new object[] { _game.UsedMap.Boards[7], _game.UsedMap.Boards.ToList() });
methodInfo.Invoke(_game, new object[] { _game.UsedMap.Boards[7] });
_game.UsedMap.Boards[8].Value = 6;
methodInfo.Invoke(_game, new object[] { _game.UsedMap.Boards[8], _game.UsedMap.Boards.ToList() });
methodInfo.Invoke(_game, new object[] { _game.UsedMap.Boards[8] });
_game.UsedMap.Boards[9].Value = 7;
methodInfo.Invoke(_game, new object[] { _game.UsedMap.Boards[9], _game.UsedMap.Boards.ToList() });
methodInfo.Invoke(_game, new object[] { _game.UsedMap.Boards[9] });
_game.UsedMap.Boards[10].Value = 2; // penalty (- 3)
methodInfo.Invoke(_game, new object[] { _game.UsedMap.Boards[10], _game.UsedMap.Boards.ToList() });
methodInfo.Invoke(_game, new object[] { _game.UsedMap.Boards[10] });
_game.PutPenaltyForLostCells(_game.UsedMap.Boards);

Loading…
Cancel
Save