Islanders-Game / Islanders

A clone of the popular "Settlers of Catan", written in Typescript.
Other
4 stars 0 forks source link

Implement more tests for rules #1199

Open andersfischernielsen opened 3 years ago

andersfischernielsen commented 3 years ago

I've encountered players being able to execute a lot of illegal moves (according to the real-world game rules).

We should cover the full ruleset in the Shared tests.

andersfischernielsen commented 3 years ago

Related to/identical to: #80

andersfischernielsen commented 3 years ago

80 is a duplicate of this.

andersfischernielsen commented 3 years ago

All implemented features now have tests. On to implementing the remaining functionality, then

andersfischernielsen commented 3 years ago

points.spec.ts, harbors.spec.ts, and trading.spec.ts are the only files missing tests.

andersfischernielsen commented 3 years ago

trading.spec.ts now has tests (22b95f1db13969f38a72b90b33ee6cd57d283309)

Missing:

andersfischernielsen commented 3 years ago

neighbouringHexCoords in MatrixCoordinate.ts currently makes all harbour tests fail, since it's reporting incorrect neighbour hexes.

andersfischernielsen commented 3 years ago

Tests have been added for harbors.spec.ts. Only a few tests in points.spec.ts are missing.