JeremyLeland / tantrix

Colorful line puzzle with hexagonal pieces
1 stars 0 forks source link

Implement turn rules #1

Open JeremyLeland opened 2 months ago

JeremyLeland commented 2 months ago

Follow proper turn order: 1) Forced moves (and only forced moves) 2) Free move 3) Remaining forced moves

Add a turn phase to game state to reflect this? (e.g. phase: 0, 1, 2)

Also implement the restriction rules (only in place while there are still pieces in deck) 1) No three links of same color in forced space 2) No fourth piece around a forced space 3) Do not place a tile along a "controlled side"

This logic would probably go in isValidMove(), which would need to know about the full gameState (deck status)

See: http://www.tantrix.com/english/TantrixGameRules.html

JeremyLeland commented 2 months ago

Will probably want some sort of UI to show what phase of turn we are in.

JeremyLeland commented 2 months ago

Still need to limit valid moves to forced moves during phase 0 and 2.