Bingo Game Maker

This is a very simple way to create bingo boards with random layouts.

Granted you need PHP and Linux, but if you have them, and you want to create bingo boards, you're all set.

The way it works is you create a text file with one square per line. You need at least 25 lines to fill the board because I didn't feel like making any FREE squares.

Run it through bingo.php on the command line like so:

php bingo.php

Once you're happy with it, you can run it a bunch of times using:




$header = <<< HEADER


Thanksgiving Bingo

Mark each square as the event occurs.

First person to get all four corners, a complete row across, or a diagonal row gets a prize.

HEADER; $footer = <<< FOOTER
FOOTER; $squares = explode(PHP_EOL,trim(file_get_contents('bingowords.txt'))); shuffle($squares); echo $header.PHP_EOL; echo ''.PHP_EOL; for ($j = 0; $j < 25; $j++) { if (($j % 5) === 0) { echo ''.PHP_EOL; } echo ''.PHP_EOL; if (($j % 5) === 4) { echo ''.PHP_EOL; } } echo '
'.PHP_EOL; echo $footer.PHP_EOL;


rm out.html
for i in `seq 1 25`;
php bingo.php >> out.html