Coder Social home page Coder Social logo

simple-reversi's Introduction

simple-reversi

This is simple implementation of the game "Reversi". Using language: C. Data of creating: 7.12.17

Compiling the code

gcc -std=c11 -pedantic -Wall -Wextra -Werror reversi.c -o reversi

Running the game

Playing from the terminal

./reversi

Playing from the file

< file-name.in ./reversi example: < test1.in ./reversi

Game description

Reversi is a strategy board game for two players, played on an 8ร—8 uncheckered board. Players take turns placing disks on the board (with black or white color). During a play, any disks of the opponent's color that are in a straight line and bounded by the disk just placed and another disk of the current player's color are turned over to the current player's color. more: Wikipedia page

Program description

The game is played by human and computer. In every turn human can write: place on the board where he want to put his disk (example: "a1") "=" if he want to give up his turn

As the result program writes in the same line: the place on the board which computer chose in this turn and the number of points (number of dark disks subtract number of white disks) (example: a1 c3 -3) If the move that player chose is not permitted, computer write: "?"

Computer algorithm

Computer is choosing this move, which gives him more dark disks on the board after this turn. If there is more than one possibility, he choose first one (in left upper corner )

simple-reversi's People

Contributors

ulatwo 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.