Hengyu / ChessEngine

ChessEngine framework for iOS
GNU General Public License v3.0
15 stars 5 forks source link
chess stockfish

ChessEngine

ChessEngine is an open source chess engine framework for iOS. The internal ultra-strong chess engine is Stockfish.

Usage

Installation

You have multiple choices to make use of ChessEngine framework.

Quick start

Just a few lines of code:

import ChessEngine
// ..some code..
let engineManager: EngineManager = EngineManager()
engineManager.delegate = self
engineManager.gameFen = someGameFen
engineManager.startAnalyzing()

Delegate

required public func engineManager(_ engineManager: EngineManager, didReceiveBestMove bestMove: String?, ponderMove: String?)

optional public func engineManager(_ engineManager: EngineManager, didAnalyzeCurrentMove currentMove: String, number: Int, depth: Int)

optional public func engineManager(_ engineManager: EngineManager, didReceivePrincipalVariation pv: String)

optional public func engineManager(_ engineManager: EngineManager, didUpdateSearchingStatus searchingStatus: String)

Related

ChessEngine framework is inspired by the open sourced project Stockfish for iOS, it’s source code can be downloaded from here. I found this project has not been updated for a long time and it’s internal engine is stockfish 6, while the latest version is stockfish 8. So I decided to create an iOS framework that uses stockfish 8.

Thanks.

Stockfish for macOS can be found here stockfish-mac.

Contribution

Pull requests and issues are welcomed. If the pull requests are related to Stockfish engine, please go to it’s page and make pull requests.

License

GNU GENERAL PUBLIC LICENSE (Version 3). You can go to license file to see the full version.