You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
965 B
43 lines
965 B
using System.Collections.Generic;
|
|
using OrderStacks.model.gameActions.abstractRules;
|
|
|
|
namespace OrderStacks.model
|
|
{
|
|
public class Parametreur
|
|
{
|
|
|
|
public GameMode GameMode { get; set; }
|
|
public List<Player> players = new List<Player>();
|
|
public int NbPlayer { get; set; }
|
|
|
|
public Parametreur(GameMode gameMode)
|
|
{
|
|
GameMode = gameMode;
|
|
}
|
|
|
|
public void Prepare()
|
|
{
|
|
NbPlayer = players.Count;
|
|
GameMode.load(NbPlayer, players);
|
|
}
|
|
|
|
public void AddPlayer(Player player)
|
|
{
|
|
if (player != null)
|
|
{
|
|
players.Add(player);
|
|
}
|
|
}
|
|
|
|
public string getScore()
|
|
{
|
|
int score = GameMode.getScore();
|
|
players.ForEach(player =>
|
|
{
|
|
score += player.getCardList().Count;
|
|
});
|
|
return score.ToString();
|
|
}
|
|
}
|
|
}
|