// Game grain calls this method to notify that the player has left the game. public Task LeaveGame(IGameGrain game) { currentGame = null; Console.WriteLine( "Player {0} left game {1}", this.GetPrimaryKeyString(), game.GetPrimaryKeyString()); return(Task.CompletedTask); }
// Game grain calls this method to notify that the player has joined the game. public Task JoinGame(IGameGrain game) { currentGame = game; Console.WriteLine( "Player {0} joined game {1}", this.GetPrimaryKeyString(), game.GetPrimaryKeyString()); return(Task.CompletedTask); }