exports corrects

This commit is contained in:
Didictateur 2025-10-18 14:30:09 +02:00
parent ce1300bbfe
commit 15208d0bab
9 changed files with 34 additions and 18 deletions

View file

@ -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.
*/ */
@ -94,3 +85,12 @@ class Board {
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
};

View file

@ -10,3 +10,5 @@ class Card {
this.effect; this.effect;
} }
} }
export default Card;

View file

@ -7,3 +7,5 @@ class Cell {
this.piece = piece; this.piece = piece;
} }
} }
export default Cell;

View file

@ -1,3 +1,5 @@
class Effect { class Effect {
constructor() {} constructor() {}
} }
export default Effect;

View file

@ -60,3 +60,5 @@ class GameState {
return team.hasKing(); return team.hasKing();
} }
} }
export default GameState;

View file

@ -27,3 +27,5 @@ class Hand {
} }
} }
} }
export default Hand;

View file

@ -45,3 +45,5 @@ class Piece {
return this.type; return this.type;
} }
} }
export default Piece;

View file

@ -46,3 +46,5 @@ class Stack {
} }
} }
} }
export default Stack;

View file

@ -25,3 +25,5 @@ class Team {
return this.king !== null; return this.king !== null;
} }
} }
export default Team;