created PlayerType enum add FakeHuman type

This commit is contained in:
evanpelle
2024-09-06 17:55:12 -07:00
parent 0bc78d07eb
commit 4caaaea140
10 changed files with 30 additions and 20 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import {Cell, Execution, MutableGame, MutablePlayer, PlayerInfo} from "../Game"
import {Cell, Execution, MutableGame, MutablePlayer, PlayerInfo, PlayerType} from "../Game"
import {BotExecution} from "./BotExecution"
import {PlayerExecution} from "./PlayerExecution"
import {getSpawnCells} from "./Util"
@@ -41,7 +41,7 @@ export class SpawnExecution implements Execution {
player.conquer(this.mg.tile(c))
})
this.mg.addExecution(new PlayerExecution(player.id()))
if (player.isBot()) {
if (player.type() == PlayerType.Bot) {
this.mg.addExecution(new BotExecution(player))
}
this.active = false