and also if I have no legal moves it is either stalemate or checkmate
Most Recent
Forum Legend
Following
New Comments
Locked Topic
Pinned Topic
Welcome,
I wanted to create a 2-player computer chess game that I'm programming.
Here is my problem. I want to create a list of all legal moves (so I can check if the move belongs to the list, and I may implement an engine in the future).
Although I implemented easily the moves for King, Knight and Pawn (except castling and en passant), I still face problems with Rooks, Bishops and Queens.
Do you think I should implement this :
DO
...
LOOP UNTIL tile is occupied.
I should maybe put "Try" so it doesn't crash when it leaves the board.