Replaced Pools with Filters

Filters allow for a Pool constructor (defaults to Lists) that can be used to define Custom Pools.

The constructor is a function that takes the Filter Definition and returns a Custom Pool with these functions:

:add(e) - Add the Entity to the pool
:remove(e) - Remove the Entity from the pool
:has(e) boolean - Checks if the Entity exists in the pool
:clear() - Clears the Pool from Entities

Fixes #40
This commit is contained in:
Pablo Ariel Mayobre 2023-02-14 18:14:23 -03:00
parent 07bd5d0f28
commit 743d662ef9
6 changed files with 221 additions and 163 deletions

5
.gitignore vendored
View file

@ -37,4 +37,7 @@ luac.out
*.app
*.i*86
*.x86_64
*.hex
*.hex
# VSCode
.vscode/