chiark / gitweb /
wip purple etc.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Dec 2020 17:45:17 +0000 (17:45 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Dec 2020 17:45:22 +0000 (17:45 +0000)
pumpkin-books.ps.pl

index 8b22a28ffd4b10e6ada7ade6ffff941651157fcc..6713d801a533d16d738dd1fa9d6b660e47071c86 100755 (executable)
@@ -208,7 +208,77 @@ END
 }
 
 sub blue_book () {
-  my $o = general_book($blue, [qw(4 9 16)]);
+  my $o = general_book($blue, [qw(4 10 18)]);
+
+  $o .= <<END;
+/Times-Bold findfont 15 scalefont setfont $black
+END
+
+  my $exchip = sub {
+    my ($that, $pips) = @_;
+    <<END;
+  gsave ${\ chip($that, $pips) } grestore
+END
+  };
+  my $exslash = sub {
+    <<END;
+    8 -5 moveto (/) show
+    20 0 translate
+END
+  };
+  
+  my $exchline = sub {
+    my ($y, $pips, $content) = @_;
+    <<END;
+gsave 
+  0.16 0.15 0.16 $y mul add dc translate
+  0.60 dup scale
+  gsave ${\ chip($blue,$pips) } grestore
+  8 -3 moveto (:) show
+  3 0 translate
+  0.8 dup scale
+  21 0 translate
+$content
+grestore
+
+gsave
+  0.50 0.65 dc translate
+  0.65 dup scale
+  gsave -10 0 translate ${\ chip($pumpkin,1) } grestore
+  arrow
+grestore
+END
+  };
+
+  $o .= $exchline->(2, 1, <<END);
+  ${\ $exchip->($green,1) }  ${\ $exslash->() }
+  ${\ $exchip->($red,  1) }  ${\ $exslash->() }
+  ${\ $exchip->($blue, 1) }  ${\ $exslash->() }
+  ${\ $exchip->($yellow, 1) }
+END
+
+  $o .= $exchline->(1, 2, <<END);
+  ${\ $exchip->($moth,1) }  ${\ $exslash->() }
+  ${\ $exchip->($purple,1) }  ${\ $exslash->() }
+  ${\ anychip(2) }
+END
+
+  $o .= $exchline->(0, 4, <<END);
+  ${\ anychip(4) }
+END
+
+  $o .= exposition(<<END);
+If the previous chip placed was a pumpkin,
+you may exchange it as follows:
+
+END
+
+  $o;
+}
+
+sub purple_book () {
+  my $o = general_book($purple, [qw(10)]);
 
   $o .= <<END;
 /Times-Bold findfont 15 scalefont setfont $black
@@ -365,5 +435,6 @@ END
 print tile(
           green_book(),
           red_book(),
+          purple_book(),
           blue_book(),
          ) or die $! if 1;