refactor and chat base

This commit is contained in:
2023-04-22 12:42:02 +02:00
parent 2c7e7303bc
commit e4769d4b99
11 changed files with 231 additions and 144 deletions

View File

@@ -1,5 +1,6 @@
using System.Net.WebSockets;
using System.Text.Json;
using MauMau_Server.Websockets;
namespace MauMau_Server.Mau;
@@ -17,9 +18,9 @@ public class Game
Deck.AddCardToUsedDeck(CurrentCard);
}
public void AddPlayerToGame(string playerId, WebSocket socket)
public void AddPlayerToGame(ConnectionInstance connection)
{
var player = new Player("Koetje " + playerId.Split('-')[0], playerId, socket)
var player = new Player(connection)
{
Hand = Deck.DrawCards(8)
};