Guide
How to Play Chess
Chess is played by two people on an eight-by-eight board, sixteen pieces each, and the whole game has one goal: trap the opponent's king so it cannot escape capture. That is checkmate, and it ends the game immediately — you never actually take the king.
Six kinds of piece move six different ways, and learning those six patterns is genuinely most of what a beginner needs. Everything else in chess is what happens when those patterns meet.
There are three rules that surprise almost everyone the first time: castling, where the king and a rook move together in one turn; en passant, where a pawn captures another pawn that has just slipped past it; and promotion, where a pawn that reaches the far end becomes a queen — or a rook, bishop or knight if you prefer.
On Opka you play White against an AI opponent at three strengths, or hand the device back and forth in hot-seat. There is no clock. The engine owns every rule: it will only offer you legal moves, it marks your king when it is in check, it asks which piece you want when a pawn promotes, and it declares mate, stalemate and all the draws itself.
How the six pieces move
The rook moves in straight lines along a rank or a file, as far as it likes until something is in the way. The bishop does the same along diagonals, which means it stays on one colour of square all game. The queen combines both and is by far the strongest piece.
The knight moves in an L: two squares one way and one square across. It is the only piece that jumps — nothing in between matters — which is why a knight is awkward to block and easy to overlook.
The king moves one square in any direction. The pawn moves one square straight forward, or two from its starting square, but it captures diagonally and never straight ahead. That mismatch between how a pawn moves and how it takes is the source of most beginner confusion, and most of chess's structure.
- Rook: straight lines. Bishop: diagonals. Queen: both.
- Knight: an L-shape, and the only piece that jumps over others.
- Pawn: forward to move, diagonally to capture.
Check, checkmate, and stalemate
Your king is in check when an enemy piece is attacking the square it stands on. You are not allowed to leave it there: your next move must deal with it, by moving the king, blocking the line, or capturing the attacker. Opka marks the king in check so you cannot miss it.
Checkmate is check you cannot answer — every legal reply still leaves the king attacked. That ends the game at once, and it is the only way to win outright.
Stalemate is the one people mix up with checkmate, and the difference decides games. If the player to move has no legal move at all but their king is *not* in check, the game is a draw. Not a win. Being a queen up and stalemating your opponent throws away a won game, which is why endgames need care rather than speed.
- Check: your king is attacked and you must respond.
- Checkmate: no legal reply exists. The attacker wins.
- Stalemate: no legal move, but no check either. Drawn.
Castling, and its three conditions
Castling is the one move where two pieces move at once: the king travels two squares toward a rook, and that rook hops over to the square the king crossed. It is how you get your king out of the centre and your rook into the game, and most games begin with both sides doing it.
It is legal only when all of the following hold. Neither the king nor that particular rook has moved yet. Every square between them is empty. And — the condition that catches people — the king is not in check, does not finish in check, and does not pass through a square that is attacked.
That last part is precise and worth reading twice. It is the king's squares that must be safe, not the rook's. Castling queenside is still legal when the square the rook crosses is attacked, because the rook is allowed to travel through a firing line and the king is not.
- Neither the king nor that rook has moved, and the squares between are empty.
- The king may not castle out of, through, or into check.
- The rook may pass through an attacked square; the king may not.
En passant, the capture that expires
A pawn on its starting square may advance two squares. En passant exists to stop that double step being used to sneak safely past an enemy pawn that would otherwise have been able to take it.
If your pawn is on its fifth rank and an enemy pawn moves two squares to land directly beside it, you may capture that pawn as though it had only moved one square — you move diagonally onto the square it skipped, and the enemy pawn comes off the board even though your pawn never lands on it. It is the only capture in chess where the captured piece is not on the square you move to.
The right lasts exactly one turn. If you play anything else, the chance is gone for good, and it does not come back later. Opka offers the move only on the turn it is legal.
- Only against a pawn that has just moved two squares.
- You land on the square it skipped; it is captured from beside you.
- Available for one turn only, then gone.
Promotion, and the four choices
A pawn that reaches the far end of the board must become another piece — a queen, rook, bishop or knight of its own colour. It cannot stay a pawn and it cannot become a king.
Almost always you take the queen, because the queen is the strongest piece. Opka asks rather than assuming, because the exceptions are real: sometimes a knight delivers a mate or a fork a queen cannot, and occasionally a queen would force a stalemate and throw the win away, where a rook wins cleanly.
You are not limited to one. If you get a second pawn home you can have a second queen, and nothing stops a third.
- Reaching the last rank means becoming Q, R, B or N — your choice.
- Queen nearly always, but a knight or rook sometimes wins where a queen draws.
- You may promote as many pawns as you can get home.
The four ways a game is drawn
Stalemate is the first: no legal move, no check. Insufficient material is the second — if neither side has enough left to force a mate, such as bare kings or a king and one knight, the game is drawn on the spot because no sequence of legal moves could ever end it.
The fifty-move rule is the third. If fifty moves pass for each side with no capture and no pawn move, the game is drawn. It exists so a player who cannot make progress cannot simply refuse to stop.
Threefold repetition is the fourth: if the same position occurs three times, with the same side to move and the same castling and en passant possibilities, the game is drawn. In practice it is how a losing player saves a half point by forcing the same check over and over. Opka detects all four itself and tells you which one ended the game.
- Stalemate, insufficient material, fifty moves, threefold repetition.
- All four are detected automatically — no need to claim them.





