|
|
|
@ -15,7 +15,7 @@ namespace QwirkleClassLibrary
|
|
|
|
|
public Game(List<Player> pl)
|
|
|
|
|
{
|
|
|
|
|
players = pl;
|
|
|
|
|
bag = new TileBag();
|
|
|
|
|
bag = new TileBag(3);
|
|
|
|
|
|
|
|
|
|
players[0].IsPlaying = true;
|
|
|
|
|
}
|
|
|
|
@ -26,7 +26,6 @@ namespace QwirkleClassLibrary
|
|
|
|
|
{
|
|
|
|
|
if (players[i].IsPlaying == true)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(i);
|
|
|
|
|
return i;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -38,21 +37,11 @@ namespace QwirkleClassLibrary
|
|
|
|
|
get { return players.Count; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void RemoveTileInBagGame(Tile tile)
|
|
|
|
|
{
|
|
|
|
|
bag.RemoveTileInBag(tile);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<Tile> Bag
|
|
|
|
|
{
|
|
|
|
|
get { return bag.TilesInBag(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AddTileInBagOfPlayer(int posplayer, Tile tile)
|
|
|
|
|
{
|
|
|
|
|
players[posplayer].AddTilePlayer(tile);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ShowTileOfPlayer(int posplayer)
|
|
|
|
|
{
|
|
|
|
|
List<Tile> tiles = players[posplayer].Tiles;
|
|
|
|
@ -74,8 +63,21 @@ namespace QwirkleClassLibrary
|
|
|
|
|
players[old].IsPlaying = false;
|
|
|
|
|
}
|
|
|
|
|
players[neew].IsPlaying = true;
|
|
|
|
|
Console.WriteLine(players[neew].GetNameTag + "you have main now !");
|
|
|
|
|
Console.WriteLine(players[neew].GetNameTag + " you have main now !");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void TilsBagPlayer()
|
|
|
|
|
{
|
|
|
|
|
for (int i = 0; i < players.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
for (int j = 0; j < 6; j++)
|
|
|
|
|
{
|
|
|
|
|
Tile tile = Bag[j];
|
|
|
|
|
players[i].AddTilePlayer(tile);
|
|
|
|
|
bag.RemoveTileInBag(tile);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|