Quizanchos.Core 0.1.1

dotnet add package Quizanchos.Core --version 0.1.1
                    
NuGet\Install-Package Quizanchos.Core -Version 0.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Quizanchos.Core" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Quizanchos.Core" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Quizanchos.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Quizanchos.Core --version 0.1.1
                    
#r "nuget: Quizanchos.Core, 0.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Quizanchos.Core@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Quizanchos.Core&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Quizanchos.Core&version=0.1.1
                    
Install as a Cake Tool

Quizanchos.Core

Plugin SDK for the Quizanchos minigame platform.

Implement a few interfaces and your DLL becomes a runtime-loadable minigame: the host discovers it at startup, mounts your static assets, and routes game moves through your logic.

Install

dotnet add package Quizanchos.Core

Quizanchos.Common is pulled in transitively. To keep the host's copy of the SDK authoritative at runtime (avoids type-identity issues and reduces plugin size), reference it like this:

<PackageReference Include="Quizanchos.Core" Version="0.1.0"
                  PrivateAssets="all" ExcludeAssets="runtime" />

Minimal plugin

using System.Collections.Immutable;
using Microsoft.Extensions.DependencyInjection;
using Quizanchos.Core;

public sealed record MyMove : GameMove;

public sealed class MyState : IGameState
{
    public int MinigameType => 1000;
    public Guid GameId { get; set; }
    public IReadOnlyList<string> Players { get; set; } = [];
    public bool IsFinished { get; set; }
    public string? Winner { get; set; }
}

public sealed class MyDescriptor : IMinigameDescriptor
{
    public int MinigameTypeId => 1000;
    public string GameKey => "MyGame";
    public string DisplayName => "My Game";
    public bool IsPremium => false;
    public Type MoveType => typeof(MyMove);
    public string MoveDiscriminator => "myGame";

    public void RegisterServices(IServiceCollection services) { /* ... */ }

    public Task<IGameEngine> CreateGameEngineAsync(
        Guid gameId, ImmutableArray<string> playerIds,
        Dictionary<string, object> parameters, IServiceProvider sp)
        => throw new NotImplementedException();

    public Task<IGameEngine?> LoadGameEngineAsync(Guid gameId, IServiceProvider sp)
        => throw new NotImplementedException();

    public Task SaveGameStateAsync(Guid gameId, IGameState state, IServiceProvider sp)
        => throw new NotImplementedException();
}

You'll also implement IMinigameFrontendDescriptor (CSS/JS URLs, lobby route) and an IGameLogic<TState, TMove> with the actual game rules.

Key contracts

Interface Purpose
IMinigameDescriptor Backend descriptor — lifecycle hooks + DI registration
IMinigameFrontendDescriptor Frontend metadata — CSS/JS URLs, lobby route, display info
IGameLogic<TState, TMove> Pure game rules (state factory + validator + rules)
IGameEngine Runtime instance the host wraps around your logic
IGameStatePersistence Host-provided abstraction for persisting state JSON
GameMove, GameRequest, MoveResult Wire types for moves and validation

Publishing the plugin

Plugins are loaded at runtime from a directory configured by the host (typically plugins/<gameKey>/). Use dotnet publish to produce the layout:

dotnet publish -c Release -o /path/to/plugins/MyGame

The output folder should contain your DLL, its .deps.json, optionally a plugin.json manifest declaring the entry assembly, and a wwwroot/ directory with static assets.

Notes

  • Third-party MinigameTypeId values must be ≥ 1000 (1–999 are reserved for first-party plugins).
  • The host's PluginLoadContext redirects Quizanchos.Core / Quizanchos.Common / Microsoft.* / System.* to the default load context, so descriptor types are reference-equal across the plugin boundary.
  • Game state is persisted as a JSON blob via IGameStatePersistence — your plugin doesn't need its own database.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 122 5/19/2026
0.1.0 117 5/8/2026