예제 #1
0
        public bool InvitePlayer(GameSize gameSize, string otherNick)
        {
            if (Nick == otherNick)
            {
                return(false);
            }

            var msg = new InvitationMessage()
            {
                SenderNick   = Nick,
                ReceiverNick = otherNick,
                GameSize     = gameSize
            };

            _pexesoChannel.InvitePlayer(msg);
            return(true);
        }
예제 #2
0
 public void ReceiveGame(InvitationMessage message, bool turn)
 {
     ReceiveGameEvent?.Invoke(message, turn);
 }
예제 #3
0
 public bool AcceptInvitation(InvitationMessage message)
 {
     return(InvitationMessageIncomeEvent?.Invoke(message) ?? false);
 }