From 59f4a8d05493ae5b1abdf9e16153af25b7379eeb Mon Sep 17 00:00:00 2001 From: RainRat Date: Sun, 15 Sep 2024 18:30:15 -0700 Subject: [PATCH] fix typos --- src/movegen.h | 2 +- src/parser.cpp | 2 +- src/position.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/movegen.h b/src/movegen.h index ffdd9bfd..269003ee 100644 --- a/src/movegen.h +++ b/src/movegen.h @@ -28,7 +28,7 @@ namespace Stockfish { class Position; enum GenType { - /// yjf2002ghty: I think it's better to add some explanations here so that new developers can understand what these means, as some of the terms connot be found in chessprogramming wiki. I'm not sure if my explanations are correct. If there are anything wrong, please point it out. + /// yjf2002ghty: I think it's better to add some explanations here so that new developers can understand what these means, as some of the terms cannot be found in chessprogramming wiki. I'm not sure if my explanations are correct. If there are anything wrong, please point it out. //Moves that a piece is removed from the board as part of the completion of the move CAPTURES, diff --git a/src/parser.cpp b/src/parser.cpp index dd879a99..f83470c8 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -249,7 +249,7 @@ namespace { } else if (ch == ',' || ch == ')') { - if (RankNum == 0) // Here if RankNum==0 then it means either user delcared a 0 as rank, or no rank number delcared at all + if (RankNum == 0) // Here if RankNum==0 then it means either user declared a 0 as rank, or no rank number declared at all { std::cerr << "At char " << i << " of PieceTypeBitboardGroup declaration: Illegal rank number: " << RankNum << std::endl; return false; diff --git a/src/position.h b/src/position.h index 242cce05..9d1de780 100644 --- a/src/position.h +++ b/src/position.h @@ -503,7 +503,7 @@ inline Bitboard Position::promotion_zone(Piece p) const { inline Square Position::promotion_square(Color c, Square s) const { assert(var != nullptr); - /// yjf2002ghty: I'm not clear what Square s means, whether it refers to a square of a piece or it can refer to any square. I assume it means a square of a piece which can excute piece_on(s) + /// yjf2002ghty: I'm not clear what Square s means, whether it refers to a square of a piece or it can refer to any square. I assume it means a square of a piece which can execute piece_on(s) Piece p = piece_on(s); Bitboard b = ((p == NO_PIECE) ? Bitboard(0) : promotion_zone(p)) & forward_file_bb(c, s) & board_bb(); return !b ? SQ_NONE : c == WHITE ? lsb(b) : msb(b);