public void BoxAction(BoxScript box) { if (GameManagerScript.instance.CurrentPlayer.HasBoxesInHand()) { if (box.FreePlace) { int col = BoxManagerScript.instance.CurrentColorIndex; int sha = BoxManagerScript.instance.CurrentShapeIndex; if (box.CanBePlaced1(sha, col) && box.CanBePlaced3() && box.CanBePlaced2(sha, col)) { box.PlaceBox(sha, col); BoxManagerScript.instance.FreeBoxesInGame.Remove(box); BoxManagerScript.instance.AddToPlayedBoxes(box); GameManagerScript.instance.CurrentPlayer.RemoveBoxFromHand(); GameManagerScript.instance.CurrentPlayer.UpdatePlayerBoxes(); GuiManagerScript.instance.BlockTrade(true); GuiManagerScript.instance.BlockEnd(false); } } } }