Skip to content

a simple implementation of Othello game in java

Notifications You must be signed in to change notification settings

MmahdiM79/Othello

Repository files navigation

Othello(Reversi)

Othello or Reversi is a strategy board game for two players, played on an 8×8 uncheckered board. It was invented in 1883. Othello, a variant with a change to the board's initial setup, was patented in 1971. (read more)

This was my AP(Advance Programming) course project of my university second semester 2019 - 2020 (1398 - 1399). It is a simple implementation of the Othollo game in Java (without GUI).

Installation

Just download the file of classes, put them on a same directory(a same folder).

Usage

compile them(you must have JDK(Java Development Kit) on your system. you can download it from here) and then run the Run class.

comile step:

$ javac *.java

start the game:

$ java Run

WARNNIG: for a colorfull output in terminal, I used ANSI codes and some emojis. So you can't compile and run it on Windows OS.

Contributing

This project has a simple AI (int Bot class) and dosen't have GUI. So pull requests are welcome for this parts or other changes that make it better

A quick overview of classes:

  • Run: the main class of the game (includes main method)
  • Rules: for check the game rules and apply players chooses
  • Printer: do all required outputs in terminal
  • Board: the board of the game
  • Person: hold the information of players
  • Player: hold player score, character and ID
  • Bot: a simple AI. plays instead of player2 in single player mode

some photos of project

github-octocat github-octocat github-octocat github-octocat github-octocat github-octocat

About

a simple implementation of Othello game in java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages