aboutsummaryrefslogtreecommitdiff
path: root/bsq/gen.pl
diff options
context:
space:
mode:
Diffstat (limited to 'bsq/gen.pl')
-rwxr-xr-xbsq/gen.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/bsq/gen.pl b/bsq/gen.pl
new file mode 100755
index 0000000..bac7219
--- /dev/null
+++ b/bsq/gen.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+
+my ($x, $y, $density) = @ARGV;
+
+print "$y.ox\n";
+for (my $i = 0; $i < $y; $i++) {
+ for (my $j = 0; $j < $x; $j++) {
+ if (int(rand($y) * 2) < $density) {
+ print "o";
+ }
+ else {
+ print ".";
+ }
+ }
+ print "\n";
+}
+
+