Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Games::Bondigi, the one and only drinking game that's also a CPAN module
Perl
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
t
Artistic
COPYING
ChangeLog
Changes
INSTALL
LICENSE
MANIFEST
MANIFEST.SKIP
META.yml
Makefile.PL
README

README

Games::BonDigi
==============

DESCRIPTION

  This is a crazy, crazy, crazy, crazy, *crazy* module.
  There is absolutely *no* reason to download it.
  Please, stay away from it, by any means!

  Ok, I've warned you.

  If you don't know what Bon-Digi is, you are really lucky.
  Esteban, I promised to do that... And there it is!

  Actually, this is a quite interesting experiment in
  software design of clever algorithms. Either I'm stupid
  or generating the sequence of "Bon" "Digi" words is
  really much harder than I thought at first.

  Try to think of an algorithm and to build *elegant* and
  *concise* code. You will find that is not so easy...

  For any meaning of elegant and concise, of course.


THE GAME ITSELF

  This is rather crazy. I will describe it as an RFC and then
  give you an example.

  BonDigi works with its own internal protocol. The protocol
  consists of a HEADER ("fixed part"), and a PAYLOAD ("the part
  that grows").

  HEADER is *always*: "Bon", "Digi", "Bon", "Digi"

  PAYLOAD is "Bon", "Bon", "Digi", "Digi" (2 repeats the first
  time, then it grows with 3, 4, 5, you get it)


EXAMPLE

  Suppose you are ten people in the same room, drinking beers
  or something. Then someone starts this *crazy* game.

  At turn, each of you must say the next word in the sequence.
  If you say the wrong word, you must drink beer, write
  Games::BonDigi, make yourself foolish, and so on...

  Sequence starts like this:

  Bon, Digi, Bon, Digi, /*header*/, Bon, Bon, Digi, Digi, /*payload x 2*/,
  Bon, Digi, Bon, Digi, /*header*/, Bon, Bon, Bon, Digi, Digi, Digi, /*payload x 3*/
  ...
  and you got it.
  Right?


FULL GRAMMAR

  <PROTOCOL> := "" | <HEADER> <PAYLOAD> <PROTOCOL>

  <HEADER>   := "Bon" "Digi" "Bon" "Digi"

 <PAYLOAD>  := "Bon" (<n> times) "Digi" (<n> times)
                where <n> grows over time

  Mmmh, a recursive stateful grammar. Gets hard.
  Ok, just kidding...

  
INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

DEPENDENCIES

No dependencies.
Pure crazyness.

COPYRIGHT AND LICENCE

Copyright (C) 2008 by Cosimo Streppone, <cosimo@cpan.org>

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.

DEPENDENCIES

  Test::More          >= 0.47

INSTALLATION

To install this module type the following:

 perl Makefile.PL
 make
 make test
 make install

AUTHOR

Cosimo Streppone <cosimo@cpan.org>

COPYRIGHT AND LICENSE

  Copyright (C) 2008 Cosimo Streppone.

  This module is free software; you can redistribute it and/or 
  modify it under the same terms as Perl itself.

The full text of the licenses can be found in the Artistic and
COPYING files included with this module, or in perlartistic and
perlgpl in Perl 5.8.1 or later.
Something went wrong with that request. Please try again.