# EventSystem

This class provides functionality to poll for and interpret events from the game window, translating them into a format that can be understood and utilized by the game logic.

```cpp
class EventSystem {
public:
    /**
     * @brief Polls for events from the given SFML RenderWindow and translates them into game commands.
     * 
     * This method checks for various SFML window events such as closure and key presses, and converts them into
     * a standard string format representing different game actions or commands.
     * 
     * @param w Reference to the SFML RenderWindow from which events are polled.
     * @return std::vector<std::string> A vector containing string representations of the polled events.
     */
    std::vector<std::string> getEvents(sf::RenderWindow& w);
};
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://r-type-5.gitbook.io/r-type/development-guidelines/ecs/graphicsystem/eventsystem.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
