diff --git a/package-lock.json b/package-lock.json index ddcb786..3f72cce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vue3-chessboard", - "version": "1.3.2", + "version": "1.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vue3-chessboard", - "version": "1.3.2", + "version": "1.3.3", "license": "GPL-3.0", "dependencies": { "chess.js": "^1.0.0-beta.6", diff --git a/package.json b/package.json index 1d0a98c..b339d02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue3-chessboard", - "version": "1.3.2", + "version": "1.3.3", "description": "vue3-chessboard is a component library for creating chess web apps with vue3", "homepage": "https://qwerty084.github.io/vue3-chessboard-docs/", "keywords": [ diff --git a/src/classes/BoardApi.ts b/src/classes/BoardApi.ts index f7b5e1a..6733a72 100644 --- a/src/classes/BoardApi.ts +++ b/src/classes/BoardApi.ts @@ -549,6 +549,16 @@ export class BoardApi { } } + /** + * Removes a piece from the board. + * @param square - The square where the piece is located. + */ + removePiece(square: Square): void { + const pieces = this.board.state.pieces; + pieces.delete(square); + this.game.remove(square); + } + /** * removes all pieces from the board */