chiark / gitweb /
pandemic-counter: wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Jan 2015 20:45:20 +0000 (20:45 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Jan 2015 20:45:20 +0000 (20:45 +0000)
Makefile
pandemic-counter-letters.fig [new file with mode: 0644]
pandemic-counter.scad [new file with mode: 0644]

index e2db3ec3ab1bb1f90ba6fcecdd9c44e9241dc956..1ae233f50ebdee944c2704e7f25ac3a020a16c52 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -72,6 +72,13 @@ knifeblock-knives-t%.dxf: knifeblock-knives-filter knifeblock-knives-trace.fig
                fig2dev -D -30 -L eps <$@.tmp.fig >$@.tmp.eps
                pstoedit -dt -f "dxf: -polyaslines -mm" $@.tmp.eps $@
 
+pandemic-counter-l%.eps: pandemic-counter-letters.fig
+               fig2dev -D +$(notdir $*) -L eps <$< >$@.tmp
+               @mv -f $@.tmp $@
+
+%.dxf:         %.eps
+               pstoedit -dt -f "dxf: -polyaslines -mm" $< $@
+
 %:             %.pl
                ./$< >$@.tmp && mv -f $@.tmp $@
 
diff --git a/pandemic-counter-letters.fig b/pandemic-counter-letters.fig
new file mode 100644 (file)
index 0000000..f3aec38
--- /dev/null
@@ -0,0 +1,16 @@
+#FIG 3.2  Produced by xfig version 3.2.5b
+Landscape
+Center
+Metric
+A4      
+100.00
+Single
+-2
+1200 2
+1 3 0 1 0 7 50 -1 -1 0.000 1 0.0000 3780 3870 675 675 3780 3870 4455 3870
+4 0 0 34 -1 14 56 0.0000 4 540 555 3510 4140 T\001
+4 0 0 31 -1 14 56 0.0000 4 540 555 3510 4140 L\001
+4 0 0 32 -1 14 56 0.0000 4 540 555 3510 4119 A\001
+4 0 0 30 -1 14 56 0.0000 4 570 555 3510 4140 C\001
+4 0 0 33 -1 14 56 0.0000 4 570 555 3510 4140 S\001
+4 0 0 35 -1 14 48 0.0000 4 465 960 3337 4098 DF\001
diff --git a/pandemic-counter.scad b/pandemic-counter.scad
new file mode 100644 (file)
index 0000000..3160932
--- /dev/null
@@ -0,0 +1,100 @@
+// -*- C -*-
+
+tokenrad=13;
+tokenthick=1.8;
+
+joinwidth=1.0;
+
+circlerad=15;
+
+module Letter(depth) {
+  translate([-circlerad,-circlerad])
+    import(file=str("pandemic-counter-l",depth,".dxf"), convexity=100);
+}
+
+module Token(depth) {
+  linear_extrude(height=tokenthick) union(){
+    difference(){
+      circle(tokenrad);
+      Letter(depth);
+    }
+    child();
+  }
+}
+
+module Token_CDC(){ ////toplevel
+  Token(30){};
+}
+module Token_Lab(){ ////toplevel
+  Token(31){};
+}
+module Token_Act(){ ////toplevel
+  Token(32){
+    translate([0, 1])
+      square([tokenrad*.75, joinwidth], center=true);
+  }
+}
+module Token_Spec(){ ////toplevel
+  Token(33){};
+}
+module Token_Terr(){ ////toplevel
+  Token(34){};
+}
+module Token_TerrMove(){ ////toplevel
+  Token(35){
+    translate([-tokenrad*.75, -1])
+      square([tokenrad*.75, joinwidth]);
+  };
+}
+
+spacing = tokenrad * 2 + 2;
+
+module Tokens(rows=1,cols=1) {
+  for (i=[0:rows-1])
+    for (j=[0:cols-1])
+      translate([j*spacing, i*spacing, 0])
+       child(0);
+}
+
+module Tokens_Act(){ //// toplevel
+  // Print *twice*, LAPIS BLUE
+  // ordinary actions
+  //  up to 4 for 5 players, plus 2 for Borrowed Time plus 1 for Generalist
+  //  so need 23, make 24
+  Tokens(4,3) Token_Act();
+}
+
+module Tokens_CDC(){ //// toplevel
+  // STORM GREY
+  // CDC
+  // 1 action per turn + 2 Borrowed Time
+  Tokens(3) Token_CDC();
+}
+
+module Tokens_Lab(){ //// toplevel
+  // WHITE
+  // free Lab action (on building research station, etc)
+  // make 2 (probably want less than that)
+  Tokens(2) Token_Lab();
+}
+
+module Tokens_Spec(){ //// toplevel
+  // ELECTRIC BLUE
+  // once-per-turn special action, one each for 5 players
+  Tokens(5) Token_Spec();
+}
+
+module Tokens_Terr(){ //// toplevel
+  // FIRE TRUCK RED
+  // Bioterrorist general actions
+  Tokens(2) Token_Terr();
+}
+
+module Tokens_TerrMove(){ //// toplevel
+  // CLASSIC BLACK
+  // Bioterrorist drive/ferry
+  Tokens(1) Token_TerrMove();
+}
+
+Tokens_TerrMove();
+