-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
This Android library offers a **standardized way** for app developers to | ||
|
||
- **provide chess engines to other chess apps** | ||
|
||
- **use provided chess engines in other chess apps** | ||
|
||
|
||
# Engine authors: how to provide a chess engine using this library # | ||
|
||
* See the StockfishChessEngine directory for an example of an app which provides Stockfish to other apps | ||
|
||
# GUI authors: how to support the open exchange format # | ||
|
||
* Import the library. Android Studio: File - New - Import Module (select the chessEngineSupportLibrary directory) | ||
* use something like: | ||
```java | ||
EngineResolver resolver = new EngineResolver(context); | ||
List<Engine> engines = resolver.resolveEngines(); | ||
``` | ||
> engines is now a list of ChessEngines for the current target. E.g.: | ||
```java | ||
TextView text = findViewById(R.id.exampleText); | ||
for (ChessEngine engine : engines) { | ||
text.append(engine.getName() + ": " + engine.getEnginePath() + "\n"); | ||
} | ||
``` | ||
> you can directly execute the engine from the engine path |