Skip to content

Latest commit

 

History

History
 
 

Othello-Reversi-Game

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

⚫ Othello/Reversi ⚪

A two-player, GUI-equipped, Othello/Reversi game made in Python3 using the pygame library.

📜 Description

Othello is a board-game played on a 8x8 board, with 64 discs that are black on one side and white on the other. Each player gets 32 such discs, out of which 2 from each player are kept on the board in the following manner:

image


A move consists of "outflanking" your opponent's disc(s), then flipping the "outflanked" disc(s) to your color. To outflank means, if your disc is kept on square X, and you have another disc on square Y, such that:

  • X and Y lie on the same row, or
  • X and Y lie on the same column, or
  • X and Y lie on the same diagonal,

If any one (or more) of the above is the case while playing, then the Opponent's discs between X and Y get flipped to your color.


Example:

Here White disc A was already present on the board, after placing White disc B, the row of Black discs between White disc A and B got outflanked,

06a8330dc692b7631a2e50660e4a7346

And thus the outflanked Black discs flipped to White.

cd51ed676fb49538035a8bf006ffbe96

For a more comprehensive explanation of the game rules, check out this link.

How to Play the Game 🎮

  1. Download the source code
  2. Make sure to install Python3 on your Computer along with pip
  3. Install the numpy and pygame libraries. To do this, open the terminal and type pip install numpy and pip install pygame.
  4. Run the main.py file and play the game!

Author

This Project was Contributed by Vikrant Singh Bhadouriya.

Thanks for your kind attention!