Exemple #1
0
        public IEnumerator TestKnightButtonSpawnsKnight()
        {
            GameObject   go     = new GameObject();
            KnightButton button = go.AddComponent <KnightButton>();

            button.button = go.AddComponent <Button>();

            BoardManager board = BoardManager.Instance;

            yield return(null);

            Assert.Null(board.Pieces[3, 5]);
            board.emptySelectionX = 3;
            board.emptySelectionZ = 5;

            board.isWhiteTurn = false;
            Coin.BlackCoins   = 3;

            button.SpawnAPiece();
            Assert.IsInstanceOf(typeof(Knight), board.Pieces[3, 5]);
        }
 public void SelectKnight()
 {
     gameManger.party.PlayerParty.Add(Knight);
     KnightButton.SetActive(false);
 }