Itangalo / Bot-Playtesting-Toolkit

A toolkit for simulating board games with Google spreadsheets. Intended use is board game development.
GNU General Public License v3.0
9 stars 1 forks source link

Should pawns on tracks have a class of its own? #48

Closed Itangalo closed 2 years ago

Itangalo commented 2 years ago

There is a bit of information connected to pawns on tracks – space id, space index and sometimes path as well. If they were a class of their own, it would probably be cleaner.

Two other advantages:

Not something to do right now, but to keep in mind.

Itangalo commented 2 years ago

Yep, I really think pawns should be a class of its own. Probably worth fixing to 1.1 -- waiting will only cause more changes to existing code.

Itangalo commented 2 years ago

And: It should still be possible to not add pawns in advance, and just start moving them (if 'assumePresent' is true).

Itangalo commented 2 years ago

Mind dump:

Pawns have

When created, they are put on start space by default. And added to the track (myTrack.pawns[pawnId]. If ID matches one of the agent's, what happens? Probably agent[trackId].pawn, which would for example be agent.board.pawn or agent.culture.pawn. Makes sense.

Itangalo commented 2 years ago

I have come more than half way through this refactoring. Pawns and tracks become much more clear and easy to work with. Good decision.

Itangalo commented 2 years ago

Tests left. And the bug fixing.

Itangalo commented 2 years ago

Done!