Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5229d56ea7
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 101 lines (71 sloc) 3.096 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Druid is a connection-oriented board game created by Cameron Browne.

This is how a typical board might look:

      A B C D E
   +-----+-----+-----+-----+-----+
 5 | | 5
   |+-----+ +-----+ |
   /| h h | + /| v v | +
 4 || h h | || v v | | 4
   |+-----+-----+ |+-----+ |
   /-----/| v v | /-----/ +
 3 | || v v | | 3
   | |+-----+ +-----+ |
   + /-----/ /| v v | +
 2 | +-----+-----+-----+
   | +-----/| h h h h h h |
   + /| v v || h h h h h h |
 1 | || v v |+-----+-----+-----+
   | |+-----/-----/-----/-----/
   +-----/-----/-----/-----/-----/
      A B C D E

Rules and a bit of strategy can be found at
http://www.cameronius.com/games/druid/

Druid presently only runs with the old branch of Rakudo, known as 'alpha'. It
is recommended to install the 'alpha' branch (or the January 2010 release)
and to make sure the installed executable is called 'alpha'.

Instructions on getting Druid running:

* Get Rakudo.
* Set some environment variables.
* Call 'alpha druid'.

There's also a an installer called 'proto' that you can use to install druid;
see 'Installing via proto' below.

== Get Rakudo

You need Rakudo to run the Perl 6 code in Druid -- instructions
here: http://rakudo.org

== Set some environment variables

 export PERL6LIB=/your/path/to/druid/lib

== Call 'perl6 druid'

Yup, you're ready to go.

% alpha druid
% alpha druid --size=10 --computer=1
% alpha druid --help

== For those who want to compile things

(After all, compilation does make startup a little faster.)

% ufo
% make

== Installing via proto

Proto is a no-fuss installer of Perl 6 projects. One of the advantages of this
way of installing Druid is that if you don't already have Rakudo Perl 6, proto
installs it for you.

1. Get proto from https://github.com/masak/proto
2. Run './proto' and optionally review the settings in the created config file
3. Run './proto install druid'
4. 'export PERL6LIB=`pwd`/projects/druid/lib'
5. 'cd projects/druid'

...and you're ready to run. See "Call 'perl6 druid'" above.

== Future plans

* Add an SVG renderer.

* Work on the machine play. (It's currently random, but I have some fairly
  nice ideas lying around in a local branch.)

* Put in a few optimizations to make Druid::Game::possible-moves O(1)
  instad of O($n**2) ($n being the size of the board), as it is presently.
  In another language, the difference might not actually be noticeable, but
  Rakudo Perl 6 is very "speed-sensitive" right now.

* Make the web app do POST requests instead of GET requests. This is more in
  line with the idea of making a move, a non-idempotent action.

* Make the web app handle different simultaneous games, played by distinct
  users. This will likely require a real databse instead of the short-term
  file solution used now.

== License

This Druid implementation is released under Artistic 2.0. See LICENSE.
Permission to release the game graciously given by the game author.
Something went wrong with that request. Please try again.