private void ToggleForbiddens(ClientRoundStatus status) { if (status.ForbiddenTiles == null) { RemoveCandidates(); return; } var forbiddens = status.ForbiddenTiles; for (int i = 0; i < handTiles.Length; i++) { var instance = handTiles[i]; if (!instance.interactable) { continue; } if (forbiddens.Contains(instance.Tile)) { instance.TurnOff(); } } if (lastDrawTile.interactable && forbiddens.Contains(lastDrawTile.Tile)) { lastDrawTile.TurnOff(); } }
private void SetCandidate(HandTile instance, IList <Tile> candidates) { var tile = instance.Tile; if (candidates.Contains(tile)) { instance.TurnOn(); } else { instance.TurnOff(); } }