Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freature/rb 159 enhance waves #139

Closed
wants to merge 38 commits into from
Closed

Conversation

TTENSHII
Copy link
Collaborator

@TTENSHII TTENSHII commented Nov 2, 2023

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Norm of the code has been respected
  • In what state is your pull request?
  • Ready to merge / Waiting a reviwer to see my work.
  • Work In Progress (WIP) / My work is not finish but i want daily reviews. (Draft)
  • CI Review / I want to see what the CI thinks of my work.
  • Need feedback / Just to have feedback on what i produced. (May not be merged)
  • What kind of change does this PR introduce? (You can choose multiple)
  • Bug fix
  • Feature request
  • New / Updated documentation
  • Testing CI ( Make the pull request in draft mode)
  • What is the current behavior? (link an issue based on the kind of change this pr introduce)

  • What is the new behavior (if this is a feature change)?

  • Other information:

Summary by CodeRabbit

New Features:

  • Enhanced the Text class with new functions and parameters, improving text handling in the game.
  • Introduced a new WaveInfos class for managing waves of enemies, enhancing gameplay dynamics.
  • Added new enemy types to the enemy_type_e enum, diversifying enemy encounters.
  • Implemented the "Wave Systems" module, introducing wave-based enemy spawning.

Bug Fixes:

  • Updated the return types of json.getJsonObjectById and json.getDataFromJson functions for more specific data retrieval.
  • Modified the waveId and waitingForNextWave properties update in WaveInfos, improving wave management.

Refactor:

  • Removed the manageBoss and initWave functions, simplifying the game system.
  • Modified the addStarWaveMessage function's signature and implementation, improving wave initiation.

Chores:

  • Added "WaveSystems.cpp" to the list of source files in the target_sources command.
  • Included "WaveSystem.hpp" in the NitworkServer class.

Tests:

  • Added error handling for the updateSystems() function, improving system stability.

@TTENSHII TTENSHII marked this pull request as draft November 2, 2023 14:33
Copy link
Contributor

coderabbitai bot commented Nov 2, 2023

Important

Auto Review Skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

Walkthrough

The changes mainly revolve around the enhancement of the game's wave system, introducing more enemy types, and refining the JSON handling. The WaveInfos class has been added to manage wave information, and the WaveSystem has been implemented to handle wave updates. The JSON handling has been made more specific with template arguments, and the enemy types have been expanded in the enemy_type_e enum.

Changes

File(s) Summary
src/Client/Raylib/Graphics/... Enhanced the Text class with new member functions and variables. The drawText function now takes a text parameter as a const reference.
src/Client/Systems/Events/..., src/ECS/Systems/BulletsSystems.cpp Modified JSON handling functions to include template arguments for more specific return types.
src/Client/Systems/Network/..., src/Nitwork/... Updated the WaveInfos singleton instance properties and modified the msgStartWave_s struct.
src/ECS/ECSCustomTypes.cpp, src/ECS/ECSCustomTypes.hpp Added the WaveInfos class for managing wave information and updated the Enemy class with an additional constructor and a new method.
src/ECS/Json.cpp, src/ECS/Json.hpp Removed the getJsonObjectById function and updated the JsonType enum and pathToJson map. Added a new function getObjectsIdInArray.
src/ECS/MessageTypes.h Expanded the enemy_type_e enum with new enemy types.
src/ECS/Systems/Systems.cpp, src/ECS/Systems/Systems.hpp Modified the initEnemy function and removed the manageBoss and initWave functions. Added a new function waveUpdate.
src/ECS/Systems/WaveSystems.cpp Implemented the "Wave Systems" module with functions for initializing and updating waves.
src/Server/Systems/WaveSystem.cpp, src/Server/Systems/WaveSystem.hpp Introduced changes to the WaveSystem implementation, adding new functions and modifying existing ones.
src/main_server.cpp Added error handling for the updateSystems() function.
.../CMakeLists.txt Updated the list of source files and include directories in various CMakeLists.txt files.

🐇🍂 "As the leaves fall, so do the enemies, wave by wave they come, in our game's symphony. 🎮🍁

With each update, we refine, making our codebase shine. 🌟💻

As the autumn wind blows, our game continues to grow. 🌬️🌳

So here's to the changes, big and small, CodeRabbit is here, hopping through them all!" 🥕🎉


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 7

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between a992dd5 and 423c746.
Files ignored due to filter (25)
  • assets/Audio/Musics/Napstablook.mp3
  • assets/Audio/Musics/Papyrus.mp3
  • assets/Boss/green-head-boss.png
  • assets/Boss/le-jutteur-boss.png
  • assets/Boss/napstablook.png
  • assets/Boss/papyrus.png
  • assets/Json/bullets.json
  • assets/Json/enemies.json
  • assets/Json/enemyData.json
  • assets/Json/playerData.json
  • assets/Json/terminator.json
  • assets/Json/wave.json
  • assets/Json/waves.json
  • assets/R-TypeSheet/bee_1.png
  • assets/R-TypeSheet/big purple boss.png
  • assets/R-TypeSheet/blue boos.png
  • assets/R-TypeSheet/classic-bullets.png
  • assets/R-TypeSheet/crawler-attack.png
  • assets/R-TypeSheet/daemon.png
  • assets/R-TypeSheet/dragon.png
  • assets/R-TypeSheet/hornet-attack.png
  • assets/R-TypeSheet/jutteurs-bullet.png
  • assets/R-TypeSheet/rat-attack.png
  • assets/R-TypeSheet/scorpion-attack.png
  • assets/R-TypeSheet/spaceship.png
Files selected for processing (22)
  • src/Client/Raylib/Graphics/Graphics.cpp (3 hunks)
  • src/Client/Raylib/Graphics/Graphics.hpp (3 hunks)
  • src/Client/Systems/Events/EventsSystems.cpp (2 hunks)
  • src/Client/Systems/Network/ClientNetwork.cpp (1 hunks)
  • src/ECS/ECSCustomTypes.cpp (2 hunks)
  • src/ECS/ECSCustomTypes.hpp (2 hunks)
  • src/ECS/Json.cpp (2 hunks)
  • src/ECS/Json.hpp (2 hunks)
  • src/ECS/MessageTypes.h (1 hunks)
  • src/ECS/Systems/BulletsSystems.cpp (2 hunks)
  • src/ECS/Systems/CMakeLists.txt (2 hunks)
  • src/ECS/Systems/Systems.cpp (2 hunks)
  • src/ECS/Systems/Systems.hpp (2 hunks)
  • src/ECS/Systems/WaveSystems.cpp (1 hunks)
  • src/Nitwork/Nitwork.h (1 hunks)
  • src/Nitwork/NitworkServer.cpp (3 hunks)
  • src/Nitwork/NitworkServer.hpp (1 hunks)
  • src/Server/CMakeLists.txt (1 hunks)
  • src/Server/Systems/CMakeLists.txt (1 hunks)
  • src/Server/Systems/WaveSystem.cpp (1 hunks)
  • src/Server/Systems/WaveSystem.hpp (1 hunks)
  • src/main_server.cpp (1 hunks)
Files skipped from review due to trivial changes (6)
  • src/ECS/Json.cpp
  • src/ECS/Systems/CMakeLists.txt
  • src/ECS/Systems/Systems.hpp
  • src/Nitwork/Nitwork.h
  • src/Server/CMakeLists.txt
  • src/Server/Systems/CMakeLists.txt
Additional comments: 41
src/ECS/MessageTypes.h (1)
  • 13-22: The new enemy types have been added correctly to the enemy_type_e enum. Ensure that these new types are handled correctly in all parts of the code where this enum is used. Also, make sure that the MAX_ENEMY_TYPE is updated whenever a new enemy type is added.
src/ECS/Systems/BulletsSystems.cpp (2)
  • 48-54: The template argument <std::string> is specified for the getJsonObjectById function. This change is consistent with the pull request summary and seems to be a necessary update following changes in the Json class. Ensure that the getJsonObjectById function is updated to handle this template argument correctly.

  • 108-114: The template argument <std::string> is specified for the getJsonObjectById function. This change is consistent with the pull request summary and seems to be a necessary update following changes in the Json class. Ensure that the getJsonObjectById function is updated to handle this template argument correctly.

src/Client/Systems/Network/ClientNetwork.cpp (1)
  • 54-61: The handleStartWave function is updating the waveId and waitingForNextWave properties of the WaveInfos singleton instance. It's also adding the initWave system to the SystemManager for the GAME scene. This seems to be a part of the wave management logic. Ensure that the initWave system is properly defined and that it's the correct system to add at this point. Also, make sure that the waveId is being correctly set and that the waitingForNextWave flag is being correctly updated.
src/ECS/Systems/Systems.cpp (2)
  • 204-209: The checkDestroyAfterDeathCallBack function is using a mutex to ensure thread safety. This is a good practice to prevent data races when multiple threads are accessing and modifying the same data. However, it's important to ensure that the lock is released in all code paths to prevent deadlocks. In this case, the std::lock_guard is used which automatically releases the lock when the scope ends, which is a good practice.

  • 399-408: The getECSSystems function is combining multiple system functions into a single vector. This is a good practice for modularity and maintainability, as it allows for easy addition or removal of systems. However, it's important to ensure that all systems are compatible and can be executed in the order they are added to the vector.

src/Client/Systems/Events/EventsSystems.cpp (2)
  • 55-61: The function getJsonObjectById is now templated and the template argument <std::string> is used. This indicates that the function now returns a std::string. Similarly, the function getDataFromJson is also templated and the template argument <float> is used. This indicates that the function now returns a float. Ensure that these changes are reflected throughout the codebase where these functions are used.

  • 100-106: The function getJsonObjectById is now templated and the template argument <std::string> is used. This indicates that the function now returns a std::string. Similarly, the function getDataFromJson is also templated and the template argument <Types::CollisionRect> is used. This indicates that the function now returns a Types::CollisionRect. Ensure that these changes are reflected throughout the codebase where these functions are used.

src/Server/Systems/WaveSystem.cpp (1)
  • 90-94: Good use of lock guards in these functions for thread safety.
src/Nitwork/NitworkServer.hpp (1)
  • 24-28: The function signature for addStarWaveMessage has been changed. Ensure that all calls to this function throughout the codebase have been updated to match the new signature. Also, verify that the waveId parameter is being correctly used within the function.
src/Client/Raylib/Graphics/Graphics.cpp (4)
  • 589-592: The drawText function now takes the text parameter as a const reference to a string. This is a good practice as it avoids unnecessary copying of the string.

  • 606-615: The Text constructor has an additional parameter keyword of type const reference to a string. Ensure that all calls to this constructor throughout the codebase have been updated to match the new signature.

  • 704-707: The Text class has two new member functions: getText and getKeyword, both returning const references to strings. This is a good practice as it provides a way to access these private members without modifying them.

  • 709-712: The Text class has a new member function setText that takes a const reference to a string. This is a good practice as it provides a way to modify the private member _text.

src/ECS/ECSCustomTypes.cpp (3)
  • 1-14: The inclusion of "Raylib.hpp" is conditional on the CLIENT macro. Ensure that this macro is defined correctly in the build system when building for the client.

  • 99-104: The prepareNextWave() function clears _remainingEnemies and sets _waitingForNextWave to true. Ensure that this function is called at the appropriate times in the game logic to prepare for the next wave of enemies.

  • 106-138: The setWaitingForNextWave() function has a significant amount of logic that is conditional on the CLIENT macro. This function updates the text displayed to the user and manages entities in the registry. Ensure that this function is called at the appropriate times in the game logic to update the user interface and manage entities correctly.

src/Nitwork/NitworkServer.cpp (3)
  • 11-14: The new include directive for "WaveSystem.hpp" is added. Ensure that the file exists and is in the correct location.

  • 216-222: The addSystem call is changed from Systems::initWave to Systems::waveHandler. Ensure that the waveHandler function exists and is correctly implemented in the Systems namespace.

- director.getSystemManager(0).addSystem(Systems::initWave);
+ director.getSystemManager(0).addSystem(Systems::waveHandler);
  • 270-281: The addStarWaveMessage function's signature is changed to take a n_id_t parameter named waveId instead of boost::asio::ip::udp::endpoint and n_id_t parameters. The function implementation is also modified to use the waveId parameter in the msgStartWave struct. Ensure that all calls to this function throughout the codebase have been updated to match the new signature.
- void NitworkServer::addStarWaveMessage(boost::asio::ip::udp::endpoint endpoint, n_id_t enemyNb)
+ void NitworkServer::addStarWaveMessage(n_id_t waveId)
src/Client/Raylib/Graphics/Graphics.hpp (4)
  • 178-184: The Text class has been updated with a new constructor that accepts a keyword parameter. This parameter is not used in any of the draw methods. If it's not used elsewhere in the class, consider removing it to avoid confusion.

  • 192-197: New getter and setter methods have been added for the Text class. These methods seem to follow good practices for encapsulation and data hiding.

  • 203-212: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [199-206]

A new private member variable _keyword has been added to the Text class. As mentioned earlier, if this variable is not used elsewhere in the class, consider removing it.

  • 209-211: New functions have been added to draw text and measure its width. These functions seem to be well-defined and follow good practices.
src/ECS/ECSCustomTypes.hpp (2)
  • 115-206: The WaveInfos class is a singleton, which is generally discouraged due to its global state and potential for creating tightly coupled code. However, if it's necessary for your use case, it's implemented correctly here. The class provides methods for managing wave information, such as setting the wave ID, adding enemies, getting remaining enemies, removing the first enemy, and checking if there are remaining enemies. The class also manages a clock ID, a flag for the first enemy created, and a flag for waiting for the next wave. The class is thread-safe due to the use of std::lock_guard in the Enemy class.

  • 115-226: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [208-238]

The Enemy class has been updated with an additional constructor that takes an enemy_id_s parameter. A static method isEnemyAlive() is added to check if there are any alive enemies. The method retrieves all entities with the Enemy component and checks if the list is empty. The class is thread-safe due to the use of std::lock_guard.

src/Server/Systems/WaveSystem.hpp (1)
  • 18-35: The Wave class has a static mutex _mutex. Be careful when using static mutexes as they can lead to deadlocks if not handled properly. Also, consider making _clockId private if it's not intended to be accessed directly from outside the class.
src/ECS/Systems/WaveSystems.cpp (11)
  • 1-6: The file header comment is good practice for providing basic information about the file.

  • 8-14: The included libraries and headers seem to be necessary for the code in this file.

  • 16-22: The conditional compilation for client and server-specific code is a good practice for code that needs to behave differently depending on the environment.

  • 26-34: The enemiesTypes map is a good way to associate enemy types with their string identifiers.

  • 36-43: The getEnemyId function correctly checks if the enemy type exists in the map before returning its value. The error handling with std::runtime_error is appropriate.

  • 45-54: The getEnemyType function correctly iterates over the map to find the enemy type associated with the given string identifier. The error handling with std::runtime_error is appropriate.

  • 56-63: The getEnemieData function correctly retrieves the enemy data from the JSON object.

  • 67-116: The initEnemy function seems to correctly initialize an enemy with the given type and position. It also correctly checks if the enemy has an ID and sets it if it does. The use of conditional compilation for client-specific code is appropriate.

  • 120-142: The initWave function correctly initializes a wave of enemies. It correctly locks the registry with std::lock_guard to prevent data races. It also correctly removes the system from the system manager after initializing the wave.

  • 144-172: The updateWave function correctly handles the updating of the wave. It correctly checks if the wave has ended and prepares the next wave if it has. It also correctly handles the creation of enemies.

  • 176-179: The getWaveSystems function correctly returns a vector of functions for updating the wave.

src/ECS/Json.hpp (3)
  • 19-27: The changes to the JsonType enum and pathToJson map are consistent with the pull request summary. Ensure that the removed DEFAULT_ENEMY and TERMINATOR values are not used elsewhere in the codebase, and that the new ENEMIES value and corresponding JSON file path are correctly used.

  • 60-75: The getObjectsIdInArray function is a new addition that retrieves a vector of object IDs from a specified array in the JSON data. It appears to be correctly implemented, but ensure that the arrayName passed to this function corresponds to an actual array in the JSON data.

  • 77-90: The getJsonObjectById function has been updated to accept a template parameter T and return a nlohmann::json object. It appears to be correctly implemented, but ensure that the arrayName passed to this function corresponds to an actual array in the JSON data, and that the id passed to this function corresponds to an actual ID in the specified array.

Comment on lines 64 to 77

lock.unlock();
while (isRunning && Nitwork::NitworkServer::getInstance().isRunning()) {
lock.lock();
director.getSystemManager(0).updateSystems();
lock.unlock();
try {
lock.lock();
director.getSystemManager(0).updateSystems();
lock.unlock();
} catch (const std::exception &e) {
Logger::fatal("UpdateSystems: " + std::string(e.what()));
break;
}
}
Nitwork::NitworkServer::getInstance().stop();
return 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error handling added to the updateSystems() function is a good practice. However, the lock.unlock(); statement in line 70 is not guaranteed to be executed if an exception is thrown in the updateSystems() function. This could lead to a deadlock situation where the mutex remains locked. To ensure the mutex is always unlocked, even in the case of an exception, consider using std::lock_guard instead of std::unique_lock. std::lock_guard automatically unlocks the mutex when it goes out of scope, which includes when an exception is thrown.

- std::unique_lock<std::mutex> lock(director.mutex);
+ std::lock_guard<std::mutex> lock(director.mutex);

Commitable suggestion (Beta)
Suggested change
lock.unlock();
while (isRunning && Nitwork::NitworkServer::getInstance().isRunning()) {
lock.lock();
director.getSystemManager(0).updateSystems();
lock.unlock();
try {
lock.lock();
director.getSystemManager(0).updateSystems();
lock.unlock();
} catch (const std::exception &e) {
Logger::fatal("UpdateSystems: " + std::string(e.what()));
break;
}
}
Nitwork::NitworkServer::getInstance().stop();
return 0;
std::lock_guard<std::mutex> lock(director.mutex);
while (isRunning && Nitwork::NitworkServer::getInstance().isRunning()) {
try {
director.getSystemManager(0).updateSystems();
} catch (const std::exception &e) {
Logger::fatal("UpdateSystems: " + std::string(e.what()));
break;
}
}
Nitwork::NitworkServer::getInstance().stop();
return 0;

Comment on lines +20 to +34
Wave::Wave() : _waveIndex(0), _msBeforeNextWave(0), _isGameEnded(false), _isTimeBetweenWaves(false)
{
try {
_wavesId = Json::getInstance().getObjectsIdInArray<std::size_t>(JsonType::WAVE, "waves");
} catch (const std::exception &e) {
Logger::fatal("WaveInit: " + std::string(e.what()));
}
if (_wavesId.empty()) {
Logger::error("WaveInit: No waves found");
_isGameEnded = true;
return;
}
_clockId = Registry::getInstance().getClock().create();
startNextWave();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constructor of Wave class is doing a lot of work. Consider breaking it down into smaller, more manageable functions for better readability and maintainability. Also, it's a good practice to wrap the entire constructor in a try-catch block to handle any exceptions that might be thrown during initialization.

Comment on lines 36 to 61
// Called when the last enemy of the wave is killed and the time between waves is over
void Wave::startNextWave()
{
auto &director = Systems::SystemManagersDirector::getInstance();
Nitwork::NitworkServer &server = Nitwork::NitworkServer::getInstance();
std::lock_guard<std::mutex> lock(_mutex);

if (_waveIndex > _wavesId.size()) {
_isGameEnded = true;
return;
}
try {
std::size_t id = _wavesId.at(_waveIndex);
nlohmann::json waveData =
Json::getInstance().getJsonObjectById<std::size_t>(JsonType::WAVE, id, "waves");
_msBeforeNextWave = Json::getInstance().getDataFromJson<std::size_t>(waveData, "msBeforeNextWave");
Types::WaveInfos::getInstance().setWaveId(static_cast<unsigned int>(id));
server.addStarWaveMessage(static_cast<n_id_t>(_wavesId.at(_waveIndex)));
_waveIndex++;
} catch (const std::exception &e) {
Logger::fatal("WaveInit: " + std::string(e.what()));
_isGameEnded = true;
return;
}
director.getSystemManager(0).addSystem(Systems::initWave);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The startNextWave function is using a lock guard which is a good practice for thread safety. However, the function is quite long and complex. Consider breaking it down into smaller functions for better readability and maintainability.

Comment on lines +63 to +70
bool Wave::isWaveEnded() const
{
if (Types::WaveInfos::getInstance().getWaitingForNextWave() == false
|| Types::WaveInfos::getInstance().isEnemyRemaining() == true || Types::Enemy::isEnemyAlive()) {
return false;
}
return true;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The isWaveEnded function is checking multiple conditions in a single if statement. This can make the code harder to read and debug. Consider breaking these conditions into separate if statements or creating helper functions for each condition.

Comment on lines 98 to 121
void waveHandler(std::size_t /*unused*/, std::size_t /*unused*/)
{
static Wave waveHandler;
Registry &registry = Registry::getInstance();
std::lock_guard<std::mutex> lock(registry.mutex);

if (waveHandler.isGameEnded()) {
std::cout << "------------------ GAME ENDED ------------------" << std::endl;
}

if (waveHandler.isWaveEnded() && waveHandler.isGameEnded() == false) {
if (waveHandler.isTimeBetweenWaves() == false) {
waveHandler.setTimeBetweenWaves(true);
registry.getClock().restart(Wave::_clockId);
return;
}
if (registry.getClock().elapsedMillisecondsSince(Wave::_clockId)
>= waveHandler.getMsBeforeNextWave()) {
waveHandler.setTimeBetweenWaves(false);
waveHandler.startNextWave();
Types::WaveInfos::getInstance().setWaitingForNextWave(false);
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The waveHandler function is quite long and complex. Consider breaking it down into smaller functions for better readability and maintainability. Also, it's a good practice to wrap the entire function in a try-catch block to handle any exceptions that might be thrown during execution.

Comment on lines +1 to +6
/*
** EPITECH PROJECT, 2023
** R-Bus
** File description:
** Wave systems serverside
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file description is not informative. Consider providing a more detailed description of the file's purpose and functionality.

Comment on lines +38 to +39
void waveHandler(std::size_t /*unused*/, std::size_t /*unused*/);
} // namespace Systems
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The waveHandler function has two parameters that are marked as unused. If these parameters are not needed, consider removing them to avoid confusion.

-    void waveHandler(std::size_t /*unused*/, std::size_t /*unused*/);
+    void waveHandler();

Commitable suggestion (Beta)
Suggested change
void waveHandler(std::size_t /*unused*/, std::size_t /*unused*/);
} // namespace Systems
void waveHandler();
} // namespace Systems

@TTENSHII TTENSHII self-assigned this Nov 3, 2023
@TTENSHII TTENSHII added the enhancement New feature or request label Nov 3, 2023
@Saverio976
Copy link
Collaborator

#143

@Saverio976 Saverio976 closed this Nov 5, 2023
@Saverio976 Saverio976 deleted the freature/RB-159-enhance-waves branch March 4, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants