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

39 lines
817 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 void SetNextPlayer(Player player_old, Player player_new)
{
for(int i = 0; i < players.Count; i++)
{
if (players[i] == player_old)
{
players[i].IsPlaying = false;
}
if (players[i] == player_new)
{
players[i].IsPlaying = true;
}
}
}
}
}