Example #1
0
 public Task Publish_Removed(Space space, Token token, int count, RemoveReason reason)
 {
     return(TokenRemoved.InvokeAsync(new TokenRemovedArgs(gameStateForEventArgs, token, reason)
     {
         Space = space,
         Count = count,
     }));
 }
Example #2
0
    public async Task Publish_Moved(Token token, Space from, Space to)
    {
        var args = new TokenMovedArgs {
            Token       = token,
            RemovedFrom = from,
            AddedTo     = to,
            Count       = 1,
            GameState   = this.gameStateForEventArgs
        };

        await TokenMoved.InvokeAsync(args);

        // Also trigger the Added & Removed events
        await TokenAdded.InvokeAsync(args);

        await TokenRemoved.InvokeAsync(args);
    }