MichaelFabrizio / KeyVector

C++ memory bootstrapping library
MIT License
0 stars 0 forks source link

[Refactor] Logic_Tests class no longer allocates its own KeyVector. Instead, it receives it by reference through the constructor. #7

Closed MichaelFabrizio closed 2 months ago

MichaelFabrizio commented 2 months ago

Within the Logic_Tests class, these changes involved replacing every instance of:

castles->DoSomething();
// Here, castles is a KeyVector*

with:

testkeyvector.DoSomething();
// Here, testkeyvector is a KeyVector&. Passed through the constructor.

This change more closely reflects how "Systems" will work in the future, similar to 'Entity-Component-Systems'. Essentially, each System is a set of functions which operates on one or multiple KeyVector references.

Note: This is exactly what the Logic_Tests class is doing internally anyway, it can run a series of test functions, and then evaluate the values for accuracy.

I also renamed the Logic_Tests.h header file to be lowercase to adhere to that naming convention.