Skip to content

UnitTests #68

Description

@CommanderCero

We need unit tests, as soon as possible.
GameState.addEntity() was changed to use entityID = entites.size() instead of an seperate variable entityID that is incremented.
This caused an issue in which entities coud have duplicate ids, which could have been avoided easily with unit tests. Note that this issue technically also exists for addPlayer(), however this is not a problem right now.

For example imagine this state:
Entity0
Entity1
Entity2

Now kill off Entity 1.
And then spawn a new one, as a result we get this

Entity0
Entity2
Entity2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions