add checkPitTypeIsNormalPitByIndex and checkPitTypeIsBankByIndex
This commit is contained in:
parent
fc254d069e
commit
ebd2fef54c
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user