Skip to content

A project by group 38, with the topic of '8x8 checkers' for DSA mini project submission

License

Notifications You must be signed in to change notification settings

Reshyurem/Draughts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSA-Mini-Project

A project by group 38, with the topic of '8x8 checkers' for DSA mini project submission

Prerequisites

Minimum Computer Specifications

Graphics - Intel HD 620
RAM - 8 GB
Processor - Intel i7 7500U

Recommended Computer Specifications

Graphics - RTX 3090
RAM - 32 GB
Processor - AMD Ryzen 9 5900X

Installing SDL library

To install in Arch, open Terminal and run the following commands:

sudo pacman -S sdl2 sdl2_image sdl2_ttf

Running the game

To run the game, you need to run the Makefile that is included in the repository.
Open the folder containing the Makefile ( SDL Coding ) and the source code functions in the Terminal, and type the following command in:

make

This will create an executable named game which can then be run.

Rules of the game

To refer to the rules of the game, click the link below: https://en.wikipedia.org/wiki/English_draughts#Rules

If you're too lazy to open the link, the rules are given below:

  • The opponent with the darker pieces moves first.

  • Pieces may only move one diagonal space forward (towards their opponents pieces) in the beginning of the game.

  • Pieces must stay on the dark squares.

  • To capture an opposing piece,"jump" over it by moving two diagonal spaces in the direction of the the opposing piece.

  • A piece may jump forward over an opponent's pieces in multiple parts of the board to capture them.

  • Keep in mind, the space on the other side of your opponent’s piece must be empty for you to capture it.

  • If your piece reaches the last row on your opponent's side, you may "crown" the piece that made it to the Kings Row. Thereby making it a "King Piece."

  • A piece can't do a double jump immediately after becoming a king

  • King pieces may still only move one space at a time during a non-capturing move. However, when capturing an opponent's piece(s) it may move diagonally forward or backwards.

The game is won when all of your opponent's pieces are captured !!

Interface

At the beginning, there is a screen that allows both players to choose their desired pieces through the terminal.

Choose Pieces Choose Pieces

Then the game board is displayed.

Game Board

From here there are 5 possible modes to progress to:

  1. Move selection - The player can click on their pieces and move their piece based on the possible moves. The possible moves are shown on screen

Move Piece

To unselect a piece, click it again

  1. Undo Move - Press u on the keyboard to return to the previous state of the game

  2. Review Mode - Press r on the keyboard to go into review mode and view all the moves made through the game. The state can be changed using the right and left arrow keys or the h and l keys on the keyboard(for the vim fans). To exit review mode, press x on the keyboard.

  3. Next K Moves - Press k on the keyboard to go into Next K Moves mode. In the Terminal, there will then be a prompt asking for the value of k. Then, similar to Review mode, the final state of the board after K moves will then be viewable. Exit is also done using x.

  4. Draw Mode - If the player presses d on the keyboard, the game then enters draw mode and the game ends with a draw. The screen closes after 10 seconds.

  5. Forfeit - If the player whose turn it is presses f on the keyboard, the game recognises that the player wants to forfeit, and game ends with the other player winning. The screen closes after 10 seconds.

About

A project by group 38, with the topic of '8x8 checkers' for DSA mini project submission

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published