Giter Club home page Giter Club logo

wdi-project-1's Introduction

Othello

View Demo

Game Setup

  1. Game Board 8 x 8, 64 black or white pieces
  2. starting position white, black, black, white (diagonal) at the center of the board.

Game Play

  1. Player1 (Black) starts first
  2. A valid move needs to fulfill 2 conditions below.
  • There needs to be at least one adjacent opposite tile.
  • in that same direction, there needs to be an identical tile without any gap in between.
  1. If one player can not make a valid move, play passes back to the other player. When neither player can move, the game ends.
  2. The player with the most pieces on the board at the end of the game wins.

screenshot

screenshot

Game Flow Diagram

screenshot

Code Design

Follows OOP

screenshot

Main logic

  • Traversing the grid as (x,y) coordinate from one tile to another, when checking for the 2 required conditions for the player move

screenshot

screenshot

TDD

  • Main logic was first built and tested simultaneously with npm test cases

screenshot

screenshot

Project Stages

  1. Requirements / Design
  2. Game Logic
  3. UI
  4. AI (stretch goal) - Future improvement

Reference

  1. https://en.wikipedia.org/wiki/Reversi
  2. http://www.othelloonline.org/
  3. background image from here
  4. icons and images from https://thenounproject.com

wdi-project-1's People

Contributors

primaulia avatar raymzag avatar taykangsheng avatar

Watchers

 avatar  avatar

wdi-project-1's Issues

Readme update

Maybe add something in your readme about the tests you have written

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.