The object of chess is to move your pieces to capture the opponent's king. A pawn can only move forward, it can move 2 steps on its first move and then one step on subsequent moves. A pawn can move one step diagonally to capture the piece on its diagonal. When your opponent's pawn has just moved 2 steps and lands on a side of your pawn, then you can capture that pawn by moving your pawn diagonally to the back of that pawn, this is called en passant. Rooks can move and capture horizontally and vertically for any distance. Knights can move by moving 2 steps forward and then 1 step sideways. Bishops can move and capture diagonally for any distance. Queens can move and capture in any direction and in any distance. The king can move and capture in any direction but only for one step. The king can also perform a move called castling, where the king moves 2 steps towards a rook and the rook will be moved to the side of the king on the opposite side. In order to perform castling, the king and the rook must both have not been moved, and that there must be no pieces between the king and the rook, also, the king and the two empty spaces from the king to the rook must not be under attack. When you move a piece to attack the king (i.e. the piece can capture the king on its next move), then the opponent must make a move so that the king is no longer under attack, failing to do so will result in a checkmate and the opponent loses. If you moved so that the opponent cannot make any valid move, then this is called stalemate and the result is a draw game.