Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Othello

This is a simple implementation of the Othello (also known as Reversi) game in Java. Othello is a strategy board game for two players, where the goal is to have the majority of discs in your color on the board at the end of the game.


Main menu

Player selecter

Othello gameplay

Features

  • Two-player gameplay (Player vs. Player).
  • Human vs Human (Human vs. Human).
  • Human vs Computer (Player vs. Random or Greedy).
  • Computer vs Computer (Either combination of Random and Greedy).
  • Board display with javafx.
  • Game ending condition (when no valid moves are left for either player).
  • Saving Othello games to files.
  • Loading Othello games from files using default file manager.
  • Undo and redo of moves.
  • Restarting games.

Requirements

  • Java 17 or higher.

How to Run

  1. Clone the repository:

    git clone https://github.com/TotalDarkness-NRF/Othello.git
    cd Othello
  2. Run the Othello Application:

    ./gradlew run
  3. Optional play on terminal: Run any of the OthelloController main functions.
    Example: OthelloControllerHumanVSHuman plays to human players on the terminal.

Gameplay Instructions

  • Player 1 uses the X or 'Black' pieces and Player 2 uses the O or 'White' pieces.
  • Players take turns placing their pieces on the board. The piece is placed on an empty space where it surrounds one or more of the opponent's pieces between the newly placed piece and another of the player's own pieces.
  • Once all valid moves are exhausted, the player with the most pieces of their color wins.
  • Board Size: The Othello board is an 8x8 grid.
  • Valid Moves: A move is valid if it captures at least one of the opponent's pieces by flipping them to your own color.
  • Flipping: A piece is flipped if it's surrounded by the players pieces on one or more lines (horizontally, vertically, or diagonally).

About

The Othello game written in Java

Resources

Stars

Watchers

Forks

Contributors

Languages