diff --git a/src/core/Board.ts b/src/core/Board.ts index b4efe9d..cdb17c6 100644 --- a/src/core/Board.ts +++ b/src/core/Board.ts @@ -83,6 +83,18 @@ export class Board { } } + public checkPitTypeIsNormalPitByIndex(index: number): boolean { + this.checkIndeAndMaybeThrowError(index); + const pitType = this.getPitTypeByIndex(index); + return pitType === 'player1Pit' || pitType === 'player2Pit'; + } + + public checkPitTypeIsBankByIndex(index: number): boolean { + this.checkIndeAndMaybeThrowError(index); + const pitType = this.getPitTypeByIndex(index); + return pitType === 'player1Bank' || pitType === 'player2Bank'; + } + public move(index: number) { this.checkIndeAndMaybeThrowError(index); const pitType = this.getPitTypeByIndex(index);