Permalink
Browse files

Andria's decision maker.

  • Loading branch information...
1 parent b7103ac commit 3bbd73511d8d7acec5c9460f1acf00f0303f5c9f @jhannah committed Aug 13, 2012
Showing with 14 additions and 0 deletions.
  1. +14 −0 ahannah/wallcolor.pl
View
@@ -0,0 +1,14 @@
+use Term::ReadKey;
+ReadMode 4; # Turn off controls keys
+my $c;
+while (not defined ($key = ReadKey(-1))) {
+ # No key yet
+ $c = int(rand(2)) ? 'red' : 'green';
+ print "$c ";
+}
+# print "Get key $key\n";
+print "\n\n\nThe walls will be: $c\n\n\n ";
+ReadMode 0; # Reset tty mode before exiting
+
+
+

0 comments on commit 3bbd735

Please sign in to comment.