Skip to content

Conversation

@kubaau
Copy link
Contributor

@kubaau kubaau commented Jul 28, 2024

First few commits from PR #1679 :

  • refactors existing cheat code ("winter" code, toggle human AI player, armageddon) into new Cheats and CheatCommandTracker classes

Copy link
Member

@Flamefire Flamefire left a comment

Choose a reason for hiding this comment

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

Great use of the circular buffer, good idea!

It does make sense to separate the cheats and the key/command tracker although I don't really like putting the cheats into the world class or having the command tracker be a part of the cheats creating a cyclic dependency and having to do cheats.trackX -> tracker.trackX

So maybe add an instance of each class to the game interface?

@kubaau kubaau force-pushed the cheats_refactoring branch 2 times, most recently from 0aa5e63 to f6baefc Compare August 5, 2024 15:34
@kubaau kubaau requested a review from Flamefire August 5, 2024 15:47
@kubaau kubaau force-pushed the cheats_refactoring branch 3 times, most recently from 97793f3 to 0665d3d Compare December 13, 2024 23:01
@kubaau kubaau force-pushed the cheats_refactoring branch from 0665d3d to 5934fd7 Compare December 13, 2024 23:18
@kubaau kubaau force-pushed the cheats_refactoring branch from 5934fd7 to 92e9c95 Compare December 13, 2024 23:25
@kubaau
Copy link
Contributor Author

kubaau commented Dec 13, 2024

Great use of the circular buffer, good idea!

It does make sense to separate the cheats and the key/command tracker although I don't really like putting the cheats into the world class or having the command tracker be a part of the cheats creating a cyclic dependency and having to do cheats.trackX -> tracker.trackX

So maybe add an instance of each class to the game interface?

Moved CheatCommandTracker out of Cheats and into dskGameInterface as it is its only user.

@kubaau
Copy link
Contributor Author

kubaau commented Dec 13, 2024

@Flamefire Please review the updates. Sorry for the huge delay :D

@kubaau kubaau force-pushed the cheats_refactoring branch 2 times, most recently from 02cfb70 to 543fd96 Compare December 14, 2024 02:03
@kubaau kubaau force-pushed the cheats_refactoring branch from 543fd96 to e761d04 Compare December 14, 2024 02:06
Copy link
Member

@Flamefire Flamefire left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks! But see the comment for the future.

@Flamefire Flamefire merged commit 79fa5fe into Return-To-The-Roots:master Dec 14, 2024
21 checks passed
@kubaau kubaau deleted the cheats_refactoring branch December 14, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants