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.
sae201_qwirkle/Qwirkle/QwirkleClassLibrary/Game.cs

47 lines
901 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace QwirkleClassLibrary
{
public class Game
{
private TileBag bag;
private List<Player> players;
public Game(List<Player> pl)
{
players = pl;
bag = new TileBag();
}
public int PositionPlayerPlay()
{
for (int i = 0; i < players.Count; i++)
{
if (players[i].IsPlaying == true)
{
return i;
}
}
return -1;
}
public void SetNextPlayer(int old, int neew)
{
players[old].IsPlaying = false;
players[neew].IsPlaying = false;
Console.WriteLine(players[neew].GetName + "you have main now !");
}
}
}
}