jordanbray / chess

A rust library to manage chess move generation
https://jordanbray.github.io/chess/
MIT License
234 stars 54 forks source link

from_fen doesnt work as expected #2

Closed timglabisch closed 7 years ago

timglabisch commented 7 years ago

i tryed to copy the fen example from https://de.wikipedia.org/wiki/Forsyth-Edwards-Notation

let board = Board::from_fen("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1".to_string()).expect("build board from fen");

i expected that this should just work, but instead the code panics.

jordanbray commented 7 years ago

I imagine you didn't call the initialize function chess::construct()

This function initializes some lookup tables for chess move generation.

If that doesn't work please let me know and I'll look deeper into it.

On Oct 28, 2016 7:29 PM, "Tim Glabisch" notifications@github.com wrote:

i tryed to copy the fen example from https://de.wikipedia.org/wiki/ Forsyth-Edwards-Notation

let board = Board::from_fen("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1".to_string()).expect("build board from fen");

i expected that this should just work, but instead the code panics.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jordanbray/chess/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaevVVVh8420uD-wXwbsD1Vg1HXG0Vkks5q4oVDgaJpZM4Kj87h .

timglabisch commented 7 years ago

thanks a lot, now everything is fine =)