Git Product home page Git Product logo

reversi's Introduction

Reversi

reversi snapshot

General Assembly Software Engineering Immersive 19 Unit 1 Project - Reversi
Check out the game here! https://kach92.github.io/Reversi/

Basic Rules and Objectives

Each reversi piece has a black side and a white side. On your turn, you place one piece on the board with your color facing up. You must place the piece so that an opponent's piece, or a row of opponent's pieces, is flanked by your pieces. All of the opponent's pieces between your pieces are then turned over to become your color. Objective of the game is to own more pieces than your opponent when the game is over. The game is over when neither player has a move. Usually, this means the board is full.

Modes

  • Single Player (Player against Bot)
  • 2 Players (Player against Player)
  • Demo (Bot against Bot)

Technologies Used

Only using basic HTML, CSS and Javascript

Approach Taken

I basically start by creating the board, and then did the algorithm for a 2 player game to work when click on the board. Then I proceed to adding additional functions like able to play with AI, and a demo mode to show the game where the AI will play against itseelf. The AI is programmed to take the move where it can change the most tiles to it's own colors.

Then only I proceed to do debugging on the codes as well as decorating the game with CSS, so that the game looks more interactive (Ask for players name, rainbow rotating color on players turn, highlights when player/AI placed a tile, 3D like buttons to press, Winning display etc). Then I proceed to add functions such as algorithm to detect no more moves, check who wins, a setting button, a display to show last moves etc.

My algorithm for the whole game is designed so that I do not hard code any number, so that it will be flexible for me to increase the board size later.

Unsolved Problems

So far I do not have any bugs, but further functions that I can add would be a confirmation screen when user chose to quite or restart the game, an undo button for player to go back to his last move, a function for player to choose larger board sizes.

Disclaimer

Music and background images does not created or belong to me and was borrowed from multiple sources online.

reversi's People

Contributors

kach92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.