/** * Turns stones on emoji in for evaluation and checks, if stones are cleared from playing field and if the sprite of the team changes * * @returns true if number of stones before and after turn in differs and when sprite of emoji changes after turn in */ public IEnumerator TurnInEmoji() { // before turn in var sprite = Emoji.GetComponent <SpriteRenderer>().sprite; var countStones = GameObject.FindGameObjectsWithTag("Stone").Count(); ButtonEmoji_1.GetComponent <Toggle>().isOn = true; ButtonEmoji_2.GetComponent <Toggle>().isOn = true; yield return(new WaitForSeconds(0.5f)); // wait for turn in to be processed // after turn in var spriteNew = Emoji.GetComponent <SpriteRenderer>().sprite; var countStonesNew = GameObject.FindGameObjectsWithTag("Stone").Count(); Assert.AreNotEqual(spriteNew, sprite, $"Player {_currentPlayer}: Emoji sprite didn't change after turn in"); Assert.AreNotEqual(countStonesNew, countStones, $"Player {_currentPlayer}: expected stones to be cleared from Emoji after turn in"); }