Skip to content

Commit

Permalink
fix default strict FEN variable
Browse files Browse the repository at this point in the history
  • Loading branch information
snk-js committed Jun 4, 2023
1 parent f8251ae commit c55e7a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export type Square =
export const DEFAULT_POSITION =
'rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'

export const DEFAULT_STRICT_SAN = false
export const DEFAULT_STRICT_FEN = true

export type Piece = {
color: Color
Expand Down Expand Up @@ -594,7 +594,7 @@ export class Chess {
private _castling: Record<Color, number> = { w: 0, b: 0 }
private _strict: boolean

constructor(fen = DEFAULT_POSITION, strict = DEFAULT_STRICT_SAN) {
constructor(fen = DEFAULT_POSITION, strict = DEFAULT_STRICT_FEN) {
this._strict = strict
this.load(fen, false, strict)
}
Expand Down

0 comments on commit c55e7a7

Please sign in to comment.