Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        m_gameState = new GameState();
        m_controller.MakeNewConnection(m_gameState);

        m_boardUI.Clear();

        m_gameState.newMovePlaced += (snapshot) =>
        {
            m_boardUI.ShowNewMove(snapshot.lastMove);
        };
    }
Esempio n. 2
0
        private void ClientEndRoundEvent(EndRoundMessage msg)
        {
            HideAll();
            ShowScoreText(msg.yourScore, msg.enemyScore);
            ShowRoundDialog();
            gameBoard.Clear();

            string win = msg.winner == CellSign.None ? "Draw" :
                         msg.winner == playerRoundSign ? "You win" : "You lose";

            ShowInfoText(win);
        }