# Class GameSelectorController

java.lang.Object
it.polimi.ingsw.is25am31.view.gui.GameSelectorController

public class GameSelectorController extends Object
Controller for the game selection screen. Allows players to view available game lobbies, create new games, or join existing ones. Manages the transition between game selection and the main game interface.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GameSelectorController()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `setClient(VirtualView client)`
  Sets the client view for this controller.
  `void`
  `setClientAndServer(VirtualView client, VirtualServer server, UUID clientId)`
  Sets the client view, server, and client ID for this controller.
  `void`
  `setGames(List<String> games)`
  Updates the game list view with the provided list of available games.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### GameSelectorController

    public GameSelectorController()

- ## Method Details

  - ### setClientAndServer

    public void setClientAndServer(VirtualView client, VirtualServer server, UUID clientId)
    Sets the client view, server, and client ID for this controller.
    Parameters:
      `client` - the virtual view representing the client interface
      `server` - the virtual server for network communication
      `clientId` - the unique identifier of the client

  - ### setGames

    public void setGames(List<String> games)
    Updates the game list view with the provided list of available games. Uses Platform.runLater to ensure thread-safe UI updates.
    Parameters:
      `games` - the list of game descriptions to display

  - ### setClient

    public void setClient(VirtualView client)
    Sets the client view for this controller.
    Parameters:
      `client` - the virtual view representing the client interface