|
|
@ -466,11 +466,11 @@ namespace QwirkleClassLibrary
|
|
|
|
|
|
|
|
|
|
|
|
public List<int> CheckTilesBag()
|
|
|
|
public List<int> CheckTilesBag()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<int> PlayerTilesBagPos = new List<int>();
|
|
|
|
List<int> PlayerTilesBagPos = [];
|
|
|
|
|
|
|
|
|
|
|
|
if (bag.TilesBag.Count == 0)
|
|
|
|
if (bag.TilesBag.Count == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (int i = 0; i < players.Count(); i++)
|
|
|
|
for (int i = 0; i < players.Count; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (players[i].Tiles.Count != 0)
|
|
|
|
if (players[i].Tiles.Count != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -485,11 +485,11 @@ namespace QwirkleClassLibrary
|
|
|
|
|
|
|
|
|
|
|
|
public bool CheckBoardTile(List<int> PlayerTilesBagPos)
|
|
|
|
public bool CheckBoardTile(List<int> PlayerTilesBagPos)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for(int i=0; i<PlayerTilesBagPos.Count(); i++)
|
|
|
|
for(int i=0; i<PlayerTilesBagPos.Count; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for(int j=0; j < this.players[PlayerTilesBagPos[i]].Tiles.Count; j++)
|
|
|
|
for(int j=0; j < this.players[PlayerTilesBagPos[i]].Tiles.Count; j++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for(int b=0; b < this.board.ReadCells.Count(); b++)
|
|
|
|
for(int b=0; b < this.board.ReadCells.Count; b++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int x = this.board.ReadCells[b].GetX;
|
|
|
|
int x = this.board.ReadCells[b].GetX;
|
|
|
|
int y = this.board.ReadCells[b].GetY;
|
|
|
|
int y = this.board.ReadCells[b].GetY;
|
|
|
@ -510,7 +510,7 @@ namespace QwirkleClassLibrary
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<int> PlayerTilesBagPos = CheckTilesBag();
|
|
|
|
List<int> PlayerTilesBagPos = CheckTilesBag();
|
|
|
|
|
|
|
|
|
|
|
|
if (PlayerTilesBagPos.Count() != 0)
|
|
|
|
if (PlayerTilesBagPos.Count != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!CheckBoardTile(PlayerTilesBagPos))
|
|
|
|
if (!CheckBoardTile(PlayerTilesBagPos))
|
|
|
|
{
|
|
|
|
{
|
|
|
|