Console-based, two-player chess in Golang.
$ ./chess
| a | b | c | d | e | f | g | h |
- +-----+-----+-----+-----+-----+-----+-----+-----+
0 | ● R | ● K | ● B | ● Q | ● G | ● B | ● K | ● R |
1 | ● P | ● P | ● P | ● P | ● P | ● P | ● P | ● P |
2 | | | | | | | | |
3 | | | | | | | | |
4 | | | | | | | | |
5 | | | | | | | | |
6 | ○ P | ○ P | ○ P | ○ P | ○ P | ○ P | ○ P | ○ P |
7 | ○ R | ○ K | ○ B | ○ Q | ○ G | ○ B | ○ K | ○ R |
- +-----+-----+-----+-----+-----+-----+-----+-----+
WHITE plays. Enter next ○ move: e7 e5
| a | b | c | d | e | f | g | h |
- +-----+-----+-----+-----+-----+-----+-----+-----+
0 | ● R | ● K | ● B | ● Q | ● G | ● B | ● K | ● R |
1 | ● P | ● P | ● P | ● P | ● P | ● P | ● P | ● P |
2 | | | | | | | | |
3 | | | | | | | | |
4 | | | | | ○ P | | | |
5 | | | | | | | | |
6 | ○ P | ○ P | ○ P | ○ P | | ○ P | ○ P | ○ P |
7 | ○ R | ○ K | ○ B | ○ Q | ○ G | ○ B | ○ K | ○ R |
- +-----+-----+-----+-----+-----+-----+-----+-----+
BLACK plays. Enter next ● move:
$ go run .
$ go test
- Pieces movement
- Capturing
- Check
- Checkmate
- Resignation
- Promotion
- Castling
- Stalemate
- En passant