Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
NoobNotFound committed Feb 1, 2024
2 parents f778b7f + 5237bee commit 2fdf0b9
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Clone the repository to your local machine.

Alternatively, you can [go to releases](https://github.com/NoobNotFound/Solitaire/releases) to download the latest version of the game.

**OmiEngine**
```C#
var OmiEngine = new Solitaire.Games.Omi.Core.Engine(Games.Omi.Enums.Players.Four);
OmiEngine.Initialize();
Expand All @@ -27,6 +28,38 @@ OmiEngine.Shuffle(5); //Shuffle 5 times
OmiEngine.Share(); //Start share
//so on
```
**Game (LAN)**
```C#
var game = new Game();

game.Host("192.168.0.1", 12345);
game.Join("192.168.0.1", 12345); //No need to do this if you are the host
game.RequestPlayer(1);
game.Reset();
game.NewGame();
game.Shuffle(3);
game.Share();
game.SetTrump(Types.Diamond);
//so on
game.JoinPlayerSuccess += (sender, playerPosition) =>
{
Console.WriteLine($"Player {playerPosition} joined successfully!");
};

game.Engine.EngineData.DataChanged += (sender, engineData) =>
{
Console.WriteLine("Engine Data Changed:");
// Handle the updated engine data
};

game.Engine.TeamData.DataChanged += (sender, teamData) =>
{
Console.WriteLine("Team Data Changed:");
// Handle the updated team data
};

```
this example is an all in one so do not copy paste because it may not work.

## Feedback

Expand Down

0 comments on commit 2fdf0b9

Please sign in to comment.