exports corrects
This commit is contained in:
parent
ce1300bbfe
commit
15208d0bab
9 changed files with 34 additions and 18 deletions
|
|
@ -2,15 +2,6 @@ import Cell from './cell.js';
|
||||||
import * as Movement from './movement/index.js';
|
import * as Movement from './movement/index.js';
|
||||||
import Piece, { PieceColor, PieceType } from './piece.js';
|
import Piece, { PieceColor, PieceType } from './piece.js';
|
||||||
|
|
||||||
export default {
|
|
||||||
Cell,
|
|
||||||
Movement,
|
|
||||||
Piece,
|
|
||||||
PieceColor,
|
|
||||||
PieceType,
|
|
||||||
Board
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the game board.
|
* Represents the game board.
|
||||||
*/
|
*/
|
||||||
|
|
@ -93,4 +84,13 @@ class Board {
|
||||||
this.setPiece(3, 7, new Piece(PieceColor.BLACK, PieceType.QUEEN, [Movement.QueenMove]));
|
this.setPiece(3, 7, new Piece(PieceColor.BLACK, PieceType.QUEEN, [Movement.QueenMove]));
|
||||||
this.setPiece(4, 7, new Piece(PieceColor.BLACK, PieceType.KING, [Movement.KingMove]));
|
this.setPiece(4, 7, new Piece(PieceColor.BLACK, PieceType.KING, [Movement.KingMove]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
Cell,
|
||||||
|
Movement,
|
||||||
|
Piece,
|
||||||
|
PieceColor,
|
||||||
|
PieceType,
|
||||||
|
Board
|
||||||
|
};
|
||||||
|
|
@ -9,4 +9,6 @@ class Card {
|
||||||
/** @type {Effect} */
|
/** @type {Effect} */
|
||||||
this.effect;
|
this.effect;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Card;
|
||||||
|
|
@ -6,4 +6,6 @@ class Cell {
|
||||||
/** @type {Piece|null} */
|
/** @type {Piece|null} */
|
||||||
this.piece = piece;
|
this.piece = piece;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Cell;
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
class Effect {
|
class Effect {
|
||||||
constructor() {}
|
constructor() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Effect;
|
||||||
|
|
@ -59,4 +59,6 @@ class GameState {
|
||||||
const team = color === PieceColor.WHITE ? this.whiteTeam : this.blackTeam;
|
const team = color === PieceColor.WHITE ? this.whiteTeam : this.blackTeam;
|
||||||
return team.hasKing();
|
return team.hasKing();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default GameState;
|
||||||
|
|
@ -26,4 +26,6 @@ class Hand {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Hand;
|
||||||
|
|
@ -44,4 +44,6 @@ class Piece {
|
||||||
getType() {
|
getType() {
|
||||||
return this.type;
|
return this.type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Piece;
|
||||||
|
|
@ -45,4 +45,6 @@ class Stack {
|
||||||
[this.stack[index], this.stack[randomIndex]] = [this.stack[randomIndex], this.stack[index]];
|
[this.stack[index], this.stack[randomIndex]] = [this.stack[randomIndex], this.stack[index]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Stack;
|
||||||
|
|
@ -24,4 +24,6 @@ class Team {
|
||||||
hasKing() {
|
hasKing() {
|
||||||
return this.king !== null;
|
return this.king !== null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Team;
|
||||||
Loading…
Reference in a new issue