Giter VIP home page Giter VIP logo

gamma's Introduction

Gamma - console game in C

Rules

The game is played on a rectangular board made of equal square fields.

Adjacent spaces on the board are those that touch each other on their sides. We do not consider fields touching only with corners as adjacent. A space forms an area if each can be reached from one another by only passing through the adjacent spaces. A single field is also an area.

One or more people may be playing. At the beginning of the game, the board is empty. Players take turns to occupy one field, placing their pawn on it. A player may occupy any unoccupied space, observing only the rule that a set of areas occupied by the same player may not, in any phase of the game, consist of more than the maximum number of areas, which is a parameter of the game. Each player can make a golden move once in the game, which consists in taking another player's pawn from the board and placing his pawn in its place, but this move must not violate the rule of the maximum number of occupied areas by any player. A player who is unable to make a move according to the above rule is out of the game, but may return to play after some golden move of another player. The game ends when neither player can move anymore. The player with the greatest number of fields wins.

Description of use

Build

mkdir release
cd release
cmake ..
make

Interactive mode

To start a new game in interactive mode, after running the program, type

I width height players max_areas

then the game board will be displayed.
Screenshot from 2021-03-17 21-06-16
Arrows - moves the cursor
Space - move
G - golden move
C - abandonment of movements
Ctrl + D - interrupt the game.

After the end of the game the result will be displayed.
Screenshot from 2021-03-17 21-09-18

gamma's People

Contributors

ggruza avatar

Watchers

 avatar

gamma's Issues

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.