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:
source bingo.sh
bingo.php
<?php
$header = <<< HEADER
Bingo
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 ''.htmlentities($squares[$j]).' '.PHP_EOL;
if (($j % 5) === 4) {
echo ' '.PHP_EOL;
}
}
echo '
'.PHP_EOL;
echo $footer.PHP_EOL;
bingo.sh
#!/bin/bash
rm out.html
for i in `seq 1 25`;
do
php bingo.php >> out.html
done
Print article | This entry was posted by elvis on 11/22/17 at 07:37:00 pm . Follow any responses to this post through RSS 2.0. |