software-challenge / backend

Server, Client und Spiel-Plugins der Software-Challenge Germany
https://www.software-challenge.de
11 stars 10 forks source link

feat(plugin): add `getPossibleMoves` function #276

Closed anarchuser closed 4 years ago

anarchuser commented 4 years ago

Given a certain GameState, the GameRuleLogic will then calculate all possible moves. Since only the currently active colour can perform moves, only moves from that colour will be present.

NOTE: It only returns SetMoves since they represent the majority of the game. An empty list should, ideally, never be returned because then that colour shouldn't be present in the game anymore