Skip to content

A command line Chess game where two players can play against each other on the command line

Notifications You must be signed in to change notification settings

thaibhoang/chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chess

A command line Chess game where two players can play against each other on the command line

HOW TO PLAY:

You play by using Chess Notation more detail on https://en.wikipedia.org/wiki/Chess

The pieces are identified by their initials. In English, these are K (king), Q (queen), R (rook), B (bishop), and N (knight; N is used to avoid confusion with king). For example, Qg5 means "queen moves to the g-file, 5th rank" (that is, to the square g5). Different initials may be used for other languages. In chess literature, figurine algebraic notation (FAN) is frequently used to aid understanding independent of language.

To resolve ambiguities, an additional letter or number is added to indicate the file or rank from which the piece moved (e.g. Ngf3 means "knight from the g-file moves to the square f3"; R1e2 means "rook on the first rank moves to e2"). For pawns, no letter initial is used; so e4 means "pawn moves to the square e4".

If the piece makes a capture, "x" is usually inserted before the destination square. Thus Bxf3 means "bishop captures on f3". When a pawn makes a capture, the file from which the pawn departed is used to identify the pawn making the capture, for example, exd5 (pawn on the e-file captures the piece on d5). Ranks may be omitted if unambiguous, for example, exd (pawn on the e-file captures a piece somewhere on the d-file). A minority of publications use ":" to indicate a capture, and some omit the capture symbol altogether. In its most abbreviated form, exd5 may be rendered simply as ed. An en passant capture may optionally be marked with the notation "e.p."

If a pawn moves to its last rank, achieving promotion, the piece chosen is indicated after the move (for example, e1=Q or e1Q). Castling is indicated by the special notations 0-0 (or O-O) for kingside castling and 0-0-0 (or O-O-O) for queenside castling. A move that places the opponent's king in check usually has the notation "+" added. There are no specific notations for discovered check or double check. Checkmate can be indicated by "#". At the end of the game, "1–0" means White won, "0–1" means Black won, and "½–½" indicates a draw.[2] Chess moves can be annotated with punctuation marks and other symbols. For example: "!" indicates a good move; "!!" an excellent move; "?" a mistake; "??" a blunder; "!?" an interesting move that may not be best; or "?!" a dubious move not easily refuted.[9]

About

A command line Chess game where two players can play against each other on the command line

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages