Skip to content

Commit 48b8d18

Browse files
committed
Do not assume we don't need canAttack if units is undefined. Some code needs both canAttack and buildableUnits
1 parent 040766d commit 48b8d18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/GameRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export class GameRunner {
201201
const tile =
202202
x !== undefined && y !== undefined ? this.game.ref(x, y) : null;
203203
const actions = {
204-
canAttack: tile !== null && units === undefined && player.canAttack(tile),
204+
canAttack: tile !== null && player.canAttack(tile),
205205
buildableUnits: player.buildableUnits(tile, units),
206206
canSendEmojiAllPlayers: player.canSendEmoji(AllPlayers),
207207
canEmbargoAll: player.canEmbargoAll(),

0 commit comments

Comments
 (0)