#pragma once

#include "CoreMinimal.h"
#include "GenericStructs.generated.h"

USTRUCT(BlueprintType)
struct FPlayerInLobby
{
	GENERATED_BODY()

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	FString Username;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	bool bIsOwner;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	bool bIsReady;


	FPlayerInLobby(FString Username, const bool bIsOwner, const bool bIsReady)
	{
		this->Username = Username;
		this->bIsOwner = bIsOwner;
		this->bIsReady = bIsReady;
	}

	FPlayerInLobby()
	{
		this->Username = "";
		this->bIsOwner = false;
		this->bIsReady = false;
	}
};

USTRUCT(BlueprintType)
struct FServerLobby
{
	GENERATED_BODY()

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	FString LobbyName;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	FString Status;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	int32 OnlinePlayers;

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
	int32 MaxPlayers;

	FServerLobby(FString LobbyName, FString Status, int32 OnlinePlayers, int32 MaxPlayers)
	{
		this->LobbyName = LobbyName;
		this->Status = Status;
		this->OnlinePlayers = OnlinePlayers;
		this->MaxPlayers = MaxPlayers;
	}

	FServerLobby()
	{
		this->LobbyName = "";
		this->Status = "";
		this->OnlinePlayers = 0;
		this->MaxPlayers = 0;
	}
};
