Skip to content

C++ chess game โ™Ÿ๏ธ. Test your skill against the computer ๐Ÿ† or sit down and relax watching two bots against each other

Notifications You must be signed in to change notification settings

zincalex/ChessCPP

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ChessCPP

A simple chess game made in C++ made for the programming exam at my university.

final result: 10/10

Table of Contents

Functionalities

The project implements:

  • A chess game with rules and special moves implemented, featuring 2 game modes -Computer vs Computer -Player vs Computer
  • A replay mode, where logs of past matches saved in .txt file can:
    • placed inside a different .txt file with all chessboard changes
    • step by step replay of the match in the terminal

Pieces

List of pieces (standard Italian pieces):

  • A: Bishop
  • D: Queen
  • R: King
  • T: Rook
  • C: Knight
  • P: Pawn

Installation

Note: CMake is required!

After cloning the project, open the folder and write:

$ cmake . 

Now it is necessary to create the dependencies:

$ make 

Usage

How to Game

First you need to select the desired game mode

If you choose cc:

  • insert the maximum rounds played by the bots

If you choose pc:

  • insert the username

The layout of the chessboard is labeled according to the classic rules:

Note: white pieces are lower case, black pieces are upper case

To specify a move insert the start position and end position. The coordinates are in the format {letter}{number}, case insensitive. Allowed moves:

  • Insert a move (e.g d2 d4)
  • FF : ask to draw

Replay mode

There are 2 mode of view a replay

  • Put replay in a .txt with all chessboard changes

  • Step by step replay of the match

Contributions

About

C++ chess game โ™Ÿ๏ธ. Test your skill against the computer ๐Ÿ† or sit down and relax watching two bots against each other

Topics

Resources

Stars

Watchers

Forks

Languages

  • C++ 99.2%
  • CMake 0.8%