LeeboxLib 1.0.2

dotnet add package LeeboxLib --version 1.0.2
                    
NuGet\Install-Package LeeboxLib -Version 1.0.2
                    
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="LeeboxLib" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LeeboxLib" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="LeeboxLib" />
                    
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 LeeboxLib --version 1.0.2
                    
#r "nuget: LeeboxLib, 1.0.2"
                    
#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 LeeboxLib@1.0.2
                    
#: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=LeeboxLib&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=LeeboxLib&version=1.0.2
                    
Install as a Cake Tool

LeeboxLib

This library is for building games for Leebox!

NuGet Version

Here is an example game:

using LeeboxLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestLeeBoxGame
{
    public static class Program
    {
        static async Task Main(string[] args)
        {
            LeeboxManager.Initialize("https://leebox.hereticalstudios.co.uk/api");
            Room room = await LeeboxManager.CreateRoom(10); //create room with 10 player slots


            Console.WriteLine($"Room created with ID: {room.ID}. press enter to start game");
            Console.ReadLine();

            await room.SyncRoomData(); //run this when ever you want to pull the latest room data

            await room.SetLocked(true); // dont let anyone else join
            await room.SetImage("https://hereticalstudios.co.uk/images/me.jpg");

            Random random = new Random();
            foreach (KeyValuePair<Player, string> v in await room.AskAll("Say something you think is true to Lee."))
            {
                Console.WriteLine($"Player: {v.Key.playerName}, Response: {v.Value}");

                //coin flip
                if (random.Next(2) == 0)
                    await v.Key.Say("Lee probably agrees.");
                else
                    await v.Key.Say("Lee probably disagrees.");
            }
            Console.ReadLine();
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 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
1.0.2 156 6/6/2025
1.0.1 202 6/1/2025
1.0.0 379 6/1/2025 1.0.0 is deprecated because it has critical bugs.

Created Leebox!