Skip to content

Zanzibarr/ChessPlusPlus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHESS ++

C++

A simple chess game made in C++ for a univesity exam.

final result: 10/10

Functionality

  • 2 play mode
    • Computer vs Computer
    • Player vs Computer
  • all special moves have been added
    • en-passant
    • castling
  • possibility to ask for surrender
  • replay mode, every match have been saved in .txt file. Two replay mode:
    • Put replay in file .txt with all chessboard changes.
    • Step by Step view with replay program

Pieces

white pieces are lower case, black pieces are upper case

List of pieces (the letters are taken from the names of standard Italian pieces):

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

Installation (in Linux)

Note: CMake is required!

after installation, open folder in shell and write :

$ cmake . ##you need root privilege

after which, some new files are created in the folder. Now it is necessary to create the dependencies:

$ cmake --build . ##you need root privilege

How to Play

First of all, you need to execute the chessboard with the desired mode:

if you choose CC:

  • you need to select the maximum round

if you choose PC:

  • you need to chose your player name

it's time to make a move! ♟️

How to read a move:

what is F2 or F4?

this is the layout of our virtual chessboard:

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

  • the numbers [1,8] are the rows
  • the letters [A,H] are the colums

A square coordinates composition is {letter}{number}

A move is composition of 2 coordinates start_position end_position

When it's your turn, monitor display this message (Rick is my nick 😉):

what you can do?

  • DRAW: you can request a draw and bot decide if accept o decline
  • XXXX: print the current status of virtual chessboard
  • Insert a Move: make your next move in form $start_postion $end_position

How to Replay

There are 2 mode of view a match replay

  • Put replay in file .txt with all chessboard changes

  • Step by Step view with replay program

Contrubutors

About

A chess game made in c++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.7%
  • CMake 1.3%