chiark / gitweb /
wip decks
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 2 Mar 2019 23:37:22 +0000 (23:37 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 2 Mar 2019 23:37:22 +0000 (23:37 +0000)
generate-board

index f5b227554c190ed1effe38502b41334b220016af..83868c234b27b9e4699437a79d19bda93f8a4dfe 100755 (executable)
@@ -507,6 +507,27 @@ sub water_cubes($){
   }
 }
 
+sub decks(){
+  o("  /deckpath {\n");
+  my $w = 63 * MM2PT;
+  my $h = 87 * MM2PT;
+  my $r =  5 * MM2PT;
+  o("    newpath  ",($w/2)," 0 moveto\n");
+  my @p = ([ $w, 0 ],
+          [ $w,$h ],
+          [ 0, $h ],
+          [ 0,  0 ]);
+  foreach my $i (0..3) {
+    o("    @{ $p[$i] }  @{ $p[($i + 1) % 4] }  $r  arct\n");
+  }
+  o("    closepath\n");
+  o("  } bind def");
+  o("  gsave 400 0 translate");
+  o("                   deckpath stroke\n");
+  o("   200 0 translate deckpath stroke\n");
+  o("  grestore");
+}
+
 sub sea_track(){
   o("% sea level track\n");
   o("  gsave 440 1700 translate\n");
@@ -641,7 +662,7 @@ sea_track();
 # xxx HS initial locations
 # xxx HS instructions
 # xxx overall instructions
-# xxx card decks
+decks();
 postamble();
 
 print STDERR Dumper(\%region) if $ENV{'GENERATE_BOARD_DUP'};