public void Test1() { int[][] b = { new int[] { 1, 2, 2 }, new int[] { 1, 2, 2 }, new int[] { 1, 2, 4 }, new int[] { 1, 2, 2 }, }; var t = new ClickGame(b); t.Click(2, 1); b[0].Should().Equal(1, 0, 2); b[1].Should().Equal(1, 0, 2); b[2].Should().Equal(1, 0, 4); b[3].Should().Equal(1, 2, 2); t.Click(0, 0); b[0].Should().Equal(0, 0, 2); b[1].Should().Equal(0, 0, 2); b[2].Should().Equal(1, 0, 4); b[3].Should().Equal(1, 2, 2); t.Click(2, 2); b[0].Should().Equal(0, 0, 0); b[1].Should().Equal(0, 0, 2); b[2].Should().Equal(1, 0, 2); b[3].Should().Equal(1, 2, 2); t.Click(3, 2); b[0].Should().Equal(0, 0, 0); b[1].Should().Equal(0, 0, 0); b[2].Should().Equal(1, 0, 0); b[3].Should().Equal(1, 0, 2); }
public void Scissors() { ClickGame.Play(); if (random == 3) { CompChoice.sprite = ScissorsPic.sprite; Draw(); } else if (random == 2) { CompChoice.sprite = PaperPic.sprite; P1win(); } else if (random == 1) { CompChoice.sprite = RockPic.sprite; P2win(); } }
IEnumerator DelayedClickGameEnd(ClickGame game) { currSuccess1 += (maxSuccess1); currTimer += 10; yield return(new WaitForSeconds(0.6f)); currTimer = Mathf.Clamp(currTimer + 5.0f, 0.0f, maxTimer); if (GameIsRunning) { ; } game.yDestLoc += 1000; if (game.gameObject) { Destroy(game.gameObject, 1.0f); } AudioManager.instance.PlaySFX("MoveCircuit"); StartRowGame(); }
public void ReceiveClickGameInfo(ClickGame game) { Debug.Log("Click game cleared"); StartCoroutine(DelayedClickGameEnd(game)); }