Code Monkey home page Code Monkey logo

cmmk's Introduction

cmmk

Catan map maker. Générateur de cartes pour Les colons de Catane.

cmmk generates random maps for the Catan board game, preventing 2 adjacent tiles to produce the same resource, and trying to balance the ressource production probabilities.

cmmk génère aléatoirement des cartes pour le jeu de plateau 'les Colons de Catane', en empêchant que 2 tuiles adjacentes produisent la même ressource, et en essayant d'équilibrer les probabilités de production de chaque ressource.

Installation

sudo npm install -g

Usage

$ cmmk --help
cmmk [retries]

Map maker for the Catan board game.

Positionals:
  retries  Retries count (only the most balanced map will be kept)
                                                         [number] [default: 100]

Options:
  --help          Show help                                            [boolean]
  --version       Show version number                                  [boolean]
  --big, -b       5-6 players board                                    [boolean]
  --tileSize, -s  Tile size                                [number] [default: 6]
$ cmmk --big --tileSize 5 1
.
                       +----+
                      / (8)  \
                +----+ Lumber +----+
               / (4)  \ 14%  / (10) \
         +----+ Grain  +----+ Grain  +----+
        / (8)  \  8%  / (9)  \  8%  / (11) \
  +----+ Lumber +----+  Wool  +----+  Wool  +----+
 / (6)  \ 14%  / (3)  \ 11%  / (8)  \  6%  / (12) \
+  Wool  +----+  Ore   +----+ Brick  +----+ Brick  +
 \ 14%  / (3)  \  6%  / (2)  \ 14%  / (11) \  3%  /
  +----+ Brick  +----+ Lumber +----+  Ore   +----+
 / (2)  \  6%  / (6)  \  3%  / (5)  \  6%  / (10) \
+ Grain  +----+ Grain  +----+  Wool  +----+ Grain  +
 \  3%  /      \ 14%  / (4)  \ 11%  / (11) \  8%  /
  +----+ Desert +----+  Ore   +----+ Brick  +----+
 / (3)  \ 17%  / (6)  \  8%  /      \  6%  / (5)  \
+ Lumber +----+  Wool  +----+ Desert +----+  Ore   +
 \  6%  / (12) \ 14%  / (10) \ 17%  / (4)  \ 11%  /
  +----+ Grain  +----+ Brick  +----+ Lumber +----+
        \  3%  / (9)  \  8%  / (9)  \  8%  /
         +----+ Lumber +----+  Ore   +----+          36% Brick
               \ 11%  / (5)  \ 11%  /                44% Grain
                +----+  Wool  +----+                 56% Lumber
                      \ 11%  /                       42% Ore
                       +----+                        67% Wool
$ LANG=fr_FR cmmk
....................................................................................................
                     +-----+
                    /       \
                   /   (6)   \
            +-----+  Brique   +-----+
           /       \   14%   /       \
          /   (5)   \       /   (3)   \
   +-----+    Blé    +-----+  Minerai  +-----+
  /       \   11%   /       \   6%    /       \
 /         \       /  (10)   \       /  (11)   \
+  Désert   +-----+   Bois    +-----+   Bois    +
 \   17%   /       \   8%    /       \   6%    /
  \       /   (8)   \       /   (9)   \       /
   +-----+  Minerai  +-----+  Brique   +-----+
  /       \   14%   /       \   11%   /       \
 /   (4)   \       /   (5)   \       /  (12)   \
+  Brique   +-----+   Laine   +-----+   Laine   +
 \   8%    /       \   11%   /       \   3%    /
  \       /   (3)   \       /   (2)   \       /
   +-----+    Blé    +-----+    Blé    +-----+
  /       \   6%    /       \   3%    /       \
 /   (9)   \       /   (6)   \       /  (11)   \
+   Laine   +-----+   Bois    +-----+   Bois    +
 \   11%   /       \   14%   /       \   6%    /
  \       /  (10)   \       /   (4)   \       /
   +-----+  Minerai  +-----+   Laine   +-----+
          \   8%    /       \   8%    /
           \       /   (8)   \       /            33% Blé
            +-----+    Blé    +-----+             33% Bois
                   \   14%   /                    33% Brique
                    \       /                     33% Laine
                     +-----+                      28% Minerai

cmmk's People

Contributors

mleguen avatar

Watchers

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