Git Product home page Git Product logo

othello's Introduction

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

othello's People

Contributors

mmahdim79 avatar

Stargazers

 avatar  avatar

Forkers

aliamrol

othello's Issues

The direction of board is not correct.

https://www.eothello.com/
The begin of board is like above web page.
Bud in the java code, the black side and white side are reverse.

Here is it.

changeBoard(3, 3, 1);  ->  changeBoard(3, 3, -1);
changeBoard(4, 4, 1);  ->  changeBoard(4, 4, -1);
changeBoard(3, 4, -1);   ->  changeBoard(3, 4, 1);
changeBoard(4, 3, -1);   ->  changeBoard(4, 3, 1);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.