🐛 (engine) fix bug where player could buy a fifth factory
This commit is contained in:
parent
f2852d3ea0
commit
787dcd5722
1 changed files with 5 additions and 1 deletions
|
|
@ -171,7 +171,11 @@ export function availableMoves(G: GameState, player: Player): AvailableMoves {
|
|||
}
|
||||
|
||||
// BuyFactory
|
||||
if (player.actions > 0 && player.money >= (player.factories.length + 1) * 3) {
|
||||
if (
|
||||
player.actions > 0 &&
|
||||
player.money >= (player.factories.length + 1) * 3 &&
|
||||
player.factories.length < 4
|
||||
) {
|
||||
const factoriesLeft: ContainerColor[] = [];
|
||||
Object.values(ContainerColor).forEach((color) => {
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue