Skip to content

raymzag/wdi-project-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

wdi-project-1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •