entelectchallenge / 2023-cy-fi Goto Github PK
View Code? Open in Web Editor NEWEntelect Challenge 2023 - CyFi
License: MIT License
Entelect Challenge 2023 - CyFi
License: MIT License
Hi There,
I seems that the ElapsedTime value in the BotState is not being calculated correctly.
The calculation of the value being sent to bots is done in BotStateDTO.cs:
This calculation uses the Start and End values as defined in HeroEntity.cs:
2023-Cy-Fi/2023-CyFi/CyFi/Entity/HeroEntity.cs
Lines 18 to 19 in ebf159c
The Start value on the hero entity is set when a bot gets registered:
2023-Cy-Fi/2023-CyFi/CyFi/CyFiEngine.cs
Line 82 in ebf159c
The End value is never given a value after being created as part of HeroEntity.
This leads to the following situation when trying to calculate ElapsedTime:
One possible place to update the End value on HeroEntities is in the root state Update function:
2023-Cy-Fi/2023-CyFi/CyFi/RootState/CyFiState.cs
Lines 40 to 54 in ebf159c
Another possible place to update the End value is in the GameLoop function where the BotStateDTO is created:
2023-Cy-Fi/2023-CyFi/CyFi/CyFiEngine.cs
Lines 124 to 139 in ebf159c
Alternatively, the End value could be removed from HeroEntities since it is not used anywhere in the program except to calculate ElapsedTime. Instead, the LastUpdated value from the Bot itself could be used since it gets updated every tick:
Depending on how / where you want to handle this I can put together a PR.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.