This is a Chess engine. Turbo Mode Reccomended Drag the pieces to move them Note: may be a bit laggy due to the sheer amount of code inside Green shows all legal moves for that piece Button functions: "colour" to switch with black and white. "Refresh" incase a piece gets stuck when moving to its position Bug reports are welcome! This took really long, but it was fun A Brief History of Chess Chess is a board game for two players. It is sometimes called international chess or Western chess to distinguish it from related games such as xiangqi (Chinese chess) and shogi (Japanese chess). Chess is an abstract strategy game that involves no hidden information and no elements of chance. It is played on a chessboard with 64 squares arranged in an 8×8 grid. The players, referred to as "White" and "Black", each control sixteen pieces: one king, one queen, two rooks, two bishops, two knights, and eight pawns. White moves first, followed by Black. The game is typically won by checkmating the opponent's king, i.e. threatening it with inescapable capture. There are several ways a game can end in a draw. The recorded history of chess goes back at least to the emergence of a similar game, chaturanga, in seventh-century India. After its introduction in Persia, it spread to the Arab world and then to Europe. The rules of chess as they are known today emerged in Europe at the end of the 15th century, with standardization and universal acceptance by the end of the 19th century. Today, chess is one of the world's most popular games and is played by millions of people worldwide. The rules of chess are published by FIDE (Fédération Internationale des Échecs; "International Chess Federation"), chess's world governing body, in its Handbook.[2] Rules published by national governing bodies, or by unaffiliated chess organizations, commercial publishers, etc., may differ in some details. FIDE's rules were most recently revised in 2023. Chess sets come in a wide variety of styles. The Staunton pattern is the most common, and is usually required for competition. Chess pieces are divided into two sets, usually light and dark colored, referred to as white and black, regardless of the actual color or design. The players of the sets are referred to as White and Black, respectively. Each set consists of sixteen pieces: one king, one queen, two rooks, two bishops, two knights, and eight pawns. The game is played on a square board of eight rows (called ranks) and eight columns (called files). By convention, the 64 squares alternate in color and are referred to as light and dark squares; common colors for chessboards are white and brown, or white and green. On White's first rank, from left to right, the pieces are placed as follows: rook, knight, bishop, queen, king, bishop, knight, rook. Eight pawns are placed on the second rank. Black's position mirrors White's, with an equivalent piece on the same file. The board is placed with a light square at the right-hand corner nearest to each player. The correct position of the light square may be remembered by the phrase "light on right", while the correct positions of the king and queen may be remembered by the phrase "queen on her own color" (i.e. the white queen begins on a light square, and the black queen on a dark square). In competitive games, the piece colors are allocated to players by the organizers; in informal games, the colors are usually decided randomly, for example by a coin toss, or by one player concealing a white pawn in one hand and a black pawn in the other, and having the opponent choose. White moves first, after which players alternate turns, moving one piece per turn (except for castling, when two pieces are moved). A piece is moved to either an unoccupied square or one occupied by an opponent's piece, which is captured and removed from play. With the sole exception of en passant, all pieces capture by moving to the square that the opponent's piece occupies. Moving is compulsory; a player may not skip a turn, even when having to move is detrimental. Each piece has its own way of moving. In the diagrams, crosses mark the squares to which the piece can move if there are no intervening piece(s) of either color (except the knight, which leaps over any intervening pieces). All pieces except the pawn can capture an enemy piece if it is on a square to which they could move if the square were unoccupied. Pieces are generally not permitted to move through squares occupied by pieces of either color, except for the knight and during castling.
Thanks to Some random YouTube tutorial. Thanks to @Chess24 for the piece sprites And Finally Thank you for playing :)