This is a simple implementation of the classic board game,
implemented in React. It supports all possible moves, including
- castling, and en passant.
+ castling, and en passant (both explained below).
- {
+
At the moment there is no support for online play, or even a simple
+ AI opponent, but both options are currently being examined.
+
+
Castling
+
Castling is a special move that allows a king and a rook to move at
+ the same time, under certain circumstances:
+
+
The king cannot be in check
+
The space the king skips over cannot be in check
+
The spaces between the king and the rook must be empty
+
Neither the king nor the rook have already moved this game
+
+
If these conditions are met, the king can move 2 spaces toward the
+ rook, and the rook moves into the space the king skipped over.
+
+
En Passant
+
+
Most people know that a pawn can jump two spaces the first time
+ it moves. En passant (French for "in passing") is a rare move
+ that can counter such a double-jump.
+
+
For example, say a white pawn double-jumps, and lands side-by-side
+ with a black pawn. That black pawn can then move into the space that
+ was jumped over (right behind the white pawn), and capture its
+ enemy!
+
+
It's not useful every game, but is very powerful in the right
+ situation!
+
+
Settings
+
{
getAllSettings().map(setting => {
return (
@@ -663,9 +693,15 @@ class Board extends React.Component {
);
})
- }
+ }
-
+
Assets have been borrowed from Wikipedia.
+
+
+
+
+
+
}
/>
@@ -685,17 +721,19 @@ class Board extends React.Component {
checkMsg + color + "'s Turn";
return (
-