mancala/src/common/CommonMancalaGame.ts

16 lines
590 B
TypeScript
Raw Normal View History

2022-05-02 00:43:12 +03:00
import { MancalaGame } from '../core/MancalaGame';
import { CommonBoard } from './CommonBoard';
2022-05-04 15:04:24 +03:00
import { GRClearBoardAtEnd } from './game_rules/GRClearBoardAtEnd';
2022-05-02 00:43:12 +03:00
import { GRLastStoneInBank } from './game_rules/GRLastStoneInBank';
import { GRLastStoneInEmptyPit } from './game_rules/GRLastStoneInEmptyPit';
export class CommonMancalaGame extends MancalaGame {
2022-05-04 15:04:24 +03:00
constructor(player1Id: string, player2Id: string) {
super(new CommonBoard(), player1Id, player2Id, player1Id, [
2022-05-02 00:43:12 +03:00
new GRLastStoneInEmptyPit(),
2022-05-04 15:04:24 +03:00
new GRLastStoneInBank(),
new GRClearBoardAtEnd()
2022-05-02 00:43:12 +03:00
]);
}
}