Skip to content

EndgameCore is a pure Swift chess library. The goal of this library is to make writing chess applications as easy as possible.

Notifications You must be signed in to change notification settings

Jelizondo/EndgameCore

Repository files navigation

EndgameCore

EndgameCore is a pure Swift chess library. The goal of this library is to make writing chess application as easy as possible. As of now the library supports PGN parsing and move generation.

Warning: This project is currently in development and is subject to changes!

Features:

  • PGN Decoding
  • PGN Encoding
  • FEN Decoding
  • FEN Encoding

Install with Swift Packages

If you are using Xcode 11 or later:

  1. On an Xcode project click File
  2. Swift Packages
  3. Add Package Dependency
  4. Specify the git URL for for EndgameCore https://github.com/Jelizondo/EndgameCore.

Usage:

Decoding from a file:

let pgn = PGNDecoder().decode(fileName: "file.pgn", bundle: .main)

Decoding from a string:

let pgn = PGNDecoder().decode(rawValue: PGNRaw)

Initialize a game from a pgn:

guard let game = Game(pgn: pgn) else {
  // Unable to create game from pgn
}

About

EndgameCore is a pure Swift chess library. The goal of this library is to make writing chess applications as easy as possible.

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages