private void OnlineTurnEnd()
    {
        // disable button
        endTurnButton.gameObject.SetActive(false);
        // lock local player
        NetInterface.Get().localPlayer.AddLock(activePlayerLock);
        // reset player for new turn
        NetInterface.Get().localPlayer.StartOfTurn();
        // trigger effects
        E_TurnEnd.Invoke();
        SwitchActivePlayer();

        foreach (Creature c in board.AllCreatures)
        {
            c.ResetForNewTurn();
        }
        foreach (Structure s in board.AllStructures)
        {
            s.ResetForNewTurn();
        }
        ActionBox.instance.gameObject.SetActive(false);
        // send opponent message
        NetInterface.Get().SyncEndTurn();
        return;
    }
 private void LocalTurnEnd()
 {
     E_TurnEnd.Invoke();
     SwitchActivePlayer();
     foreach (Creature c in board.AllCreatures)
     {
         c.ResetForNewTurn();
     }
     foreach (Structure s in board.AllStructures)
     {
         s.ResetForNewTurn();
     }
     ActionBox.instance.gameObject.SetActive(false);
     StartNewturn();
 }
    // called when recieving end turn message
    public void startTurnForOnline()
    {
        if (gameMode != GameMode.online)
        {
            throw new Exception("Only call this for online play");
        }
        // trigger end turn effects
        E_TurnEnd.Invoke();
        // re enable end turn
        endTurnButton.gameObject.SetActive(true);
        // do income and trigger effects
        SwitchActivePlayer();
        Player localPlayer = NetInterface.Get().localPlayer;

        localPlayer.StartOfTurn();
        localPlayer.DoIncome();
        localPlayer.DrawCard();
        E_TurnStart.Invoke();
        // unlock local player
        NetInterface.Get().localPlayer.RemoveLock(activePlayerLock);
    }