chiark / gitweb /
wip lotus
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Dec 2020 18:27:40 +0000 (18:27 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Dec 2020 18:27:40 +0000 (18:27 +0000)
pumpkin-books.ps.pl

index 658a2797d88220131667feea00f1d2843aebf0bd..a602fa72efab6a782601817ca3f77af79a0c456b 100755 (executable)
@@ -11,6 +11,7 @@ my $blue = ["0.6 0.6 0 0", "0 0 0 0"];
 my $yellow = ["0 0 1 0", "0 0 0 1"];
 my $moth = ["0 0 0 1", "0 0 0 0"];
 my $purple = ["0 1 0 0", "0 0 0 1"];
+my $lotus = ["1 0 0.6 0", "0 1 1 0"];
 
 sub chip ($$) {
   my ($cary, $pips) = @_; # put in a gsave translate
@@ -304,6 +305,29 @@ END
   $o;
 }
 
+sub lotus_book () {
+  my $o = general_book($lotus, [8, 0]);
+
+  $o .= <<END;
+/Times-Bold findfont 15 scalefont setfont $black
+END
+
+  my $exchip = sub {
+    my ($that, $pips) = @_;
+    <<END;
+  gsave ${\ chip($that, $pips) } grestore
+END
+  };
+
+  $o .= exposition(<<END);
+The value of this chip is
+1 higher than the number of pumpkins
+previously placed in the pot (but max.4)
+END
+
+  $o;
+}
+
 sub purple_book () {
   my $o = general_book($purple, [10, 1]);
 
@@ -450,4 +474,5 @@ print tile(
           green_book(),
           purple_book(),
           blue_book(),
+          lotus_book(),
          ) or die $! if 1;