feat(bottools): add player data and data gathering functions#1533
Merged
feat(bottools): add player data and data gathering functions#1533
Conversation
This commit adds a new `PlayerData` struct and `gatherData` function to the `bottools` package. The `PlayerData` struct represents player-specific data, including their name, tokens, and various boolean flags. The `gatherData` function takes an `InputData` struct and generates two strings, `data` and `data2`, which represent the serialized form of the input data. The main changes in this commit are: 1. Added `PlayerData` struct to represent player-specific data. 2. Implemented the `gatherData` function to serialize the input data into two strings, `data` and `data2`. 3. Added helper functions `boolToString`, `convertString`, and `remDash` to assist with data conversion and formatting. These changes are important as they provide the necessary functionality to handle and serialize player data, which is a key requirement for the bot's functionality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit adds a new
PlayerDatastruct andgatherDatafunction to thebottoolspackage. ThePlayerDatastruct represents player-specific data, including their name, tokens, and various boolean flags. ThegatherDatafunction takes anInputDatastruct and generates two strings,dataanddata2, which represent the serialized form of the input data.The main changes in this commit are:
PlayerDatastruct to represent player-specific data.gatherDatafunction to serialize the input data into two strings,dataanddata2.boolToString,convertString, andremDashto assist with data conversion and formatting.These changes are important as they provide the necessary functionality to handle and serialize player data, which is a key requirement for the bot's functionality.