1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
# stockfish [](https://godotengine.org "Made with godot") [](https://www.npmjs.com/package/@bendn/stockfish.gd) <a href='https://ko-fi.com/bendn' title='Buy me a coffee' target='_blank'><img height='28' src='https://storage.ko-fi.com/cdn/brandasset/kofi_button_red.png' alt='Buy me a coffee'> </a> ## Usage ```gdscript extends Node var fish: Stockfish func _ready() -> void: var loader := StockfishLoader.new() fish = loader.load_stockfish() fish.game = Chess.new() while not fish.game.game_over(): fish.go(5) var bestmove = yield(fish, "bestmove") prints("bestmove", "is", fish.game.move(bestmove).san) fish._position() print(fish.game.pgn(), "\n", fish.game.fen()) ```