lichess.org
Donate

Anyone can give me advices on how to code a chess board using Pyhton? It's my final year project!

Just use a simple 2D array of bytes with enums for pieces.
Or check from pychess http://www.pychess.org/
Thoug proposition byt @Daggett is just fine. Not efficient but then again efficient in python if not really doable. Using bitmasks works if you python is 64 bit one but way more complex
How you code a chess board would very much depend on what you want to do with it.
It's really appreciated that you took the time to answer me guys! I want to make a fully functionnal chess board: it will make the draw after the repetition, it will allow "en passant" only if the ennemy pawn just moved and all the other rules! I'll try python chess as some of you suggested and I'm always here if you have more suggestions.

Thank you everyone!

This topic has been archived and can no longer be replied to.