diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-03-12 15:10:54 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-03-12 15:10:54 +0300 |
commit | 2e6a4a8761bf037283f7eb8dbfd57ab7b9e977a9 (patch) | |
tree | 22012ec08067f92d8baf9ab3039f3f7cda3e7402 /src/Board/Board.test.ts | |
parent | 8aa2213390e01996e3f9682abfd5910c698df0e2 (diff) | |
download | carcassonne-engine-ts-2e6a4a8761bf037283f7eb8dbfd57ab7b9e977a9.tar.gz |
refactor: rename Cell -> Tile, Item -> Feature
Diffstat (limited to 'src/Board/Board.test.ts')
-rw-r--r-- | src/Board/Board.test.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Board/Board.test.ts b/src/Board/Board.test.ts index ad5509f..c4e5ed1 100644 --- a/src/Board/Board.test.ts +++ b/src/Board/Board.test.ts @@ -1,15 +1,15 @@ import assert from 'assert'; -import Cell, { Item } from '../Cell/Cell'; +import Tile, { Feature } from '../Tile/Tile'; import Board from "./Board"; -const { Road, Town, Empty } = Item; +const { Road, Town, Empty } = Feature; describe('Board', () => { describe('constructor', () => { it('Should initialize empty board with a starting cell', () => { const board = new Board(); assert.strictEqual(board.cells.length, 1); - assert.deepStrictEqual(board.cells[0], new Cell(Road, [Town, Road, Empty, Road])); + assert.deepStrictEqual(board.cells[0], new Tile(Road, [Town, Road, Empty, Road])); }); }); @@ -17,7 +17,7 @@ describe('Board', () => { it('Should correctly determine legal moves for 1-cell board', () => { const board = new Board(); const attachTo = board.cells[0]; - const cell = new Cell(Town, [Empty, Town, Empty, Town]); + const cell = new Tile(Town, [Empty, Town, Empty, Town]); const legalMoves = board.getAttachments(cell); assert.strictEqual(legalMoves.length, 4); |