GithubHelp home page GithubHelp logo

hiekay / sparrow_othello Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sparrow629/sparrow_othello

0.0 2.0 0.0 105 KB

This is an Android edition Othello game, AKA Reversi game, which is off-line.

Java 100.00%

sparrow_othello's Introduction

Sparrow_othello

Othello (Reversi) is a strategy board game for two players, played on a 8×8 board. There are 64 game pieces, which are white on one side and black on the other. Players take turns placing white/black pieces on the board with their assigned color facing up. During a play, pieces of the opponent's color that are in a straight line and bounded by the piece just placed and another piece of the current player's color are flipped over to the current player's color. Figure 1 shows an example of the turning pieces Game Rules:

  1. Player using black pieces will move first, and then it will be the move of the player using white pieces, and so on.
  2. When placing a new piece, all the opponent player’s piece(s), which is/are bounded by that newly placed piece and other piece(s) on the board with the same color in all 8 directions (up, down, left, right, top-left, top-right, bottom-left, and bottom-right), will be flipped into the same color as the newly placed piece. The following Figure 3 shows some examples of the flipping.
  3. Player can only place a piece on the board if that move can flip piece(s) of the opponent player.
  4. If the player does not have any move in his/her turn (no move can flip opponent player’s pieces), his/her turn will be skipped, and it becomes the opposite player’s turn (Figure 4).
  5. If all the 64 positions on the board have pieces placed, or both players do not have any more move (Figure 5), the game ends.

Basic Features:

  1. The Othello application contains 2 pages. The first page should contain candidate’s name and university number for identification purpose. This page should also provide a button “Start Game” for starting the game. The second page is the game main frame which will be loaded when the “Start Game” in the first page is pressed.
  2. At the a. b. c. d. e. second page, candidates should design the layout for A 8x8 chess board (as the example in Figure 2) 8x8 (totally 64) positions on the board for placing the chess pieces Views showing the current number of white pieces and black pieces A view showing the current turn (white/black) A button to start a “new game” anytime
  3. The game starts with the black-chess player move first, and then it is the turn of white- chess player, and so on. The move is induced when the player touch the corresponding position on the game board. For each move, the game engine should check whether this move is valid or not (Point 3 in Section “Game Rules”). The game engine can ignore any invalid move.
  4. For each valid move, the corresponding chess pieces on the board, the black/white pieces counts, and the current turn should be updated accordingly
  5. When the game ended (Point 5 in Section “Game Rules”), the game should show the information: “who wins/loses” or “game draw”.
  6. Please NOTE that NO artificial intelligent (AI) is required in this assignment. Students have to only implement the “human vs human” mode. Additional Features : A button for a player to switch on/off in showing the hint of the next possible moves (as the example showing in Figure 6).

sparrow_othello's People

Contributors

sparrow629 avatar

Watchers

 avatar  avatar

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.