gdritter repos board-games / 2d66759
First pass at shogi pieces Getty Ritter 9 years ago
1 changed file(s) with 135 addition(s) and 0 deletion(s). Collapse all Expand all
1 %!PS
2
3 72 72 scale
4 0 setgray
5 0.01 setlinewidth
6
7 /mkpiece {
8 dup
9 exec fill piece stroke
10 1.2 0 translate
11 piece stroke
12 1.2 0 translate
13 exec promoted fill piece stroke
14 1.2 0 translate
15 } def
16
17 /mksingpiece {
18 exec fill piece stroke 1.2 0 translate
19 piece stroke 1.2 0 translate
20 piece stroke 1.2 0 translate
21 } def
22
23 /piece {
24 0 0 moveto
25 1 0 lineto
26 1 1 lineto
27 0.5 1.25 lineto
28 0 1 lineto
29 closepath
30 } def
31
32 /promoted {
33 0.2 1 moveto
34 0.8 1 lineto
35 0.5 1.15 lineto
36 closepath
37 } def
38
39 /lance {
40 0.4 0.15 moveto
41 0.6 0.15 lineto
42 0.5 0.8 lineto
43 closepath
44 } def
45
46 /pawn {
47 0.3 0.15 moveto
48 0.7 0.15 lineto
49 0.5 0.7 lineto
50 closepath
51 0.6 0.75 moveto
52 0.5 0.75 0.1 0 360 arc
53 closepath
54 } def
55
56 /knight {
57 0.3 0.15 moveto
58 0.7 0.15 lineto
59 0.6 0.8 lineto
60 0.4 0.8 lineto
61 closepath
62 0.6 0.5 moveto
63 0.8 0.5 lineto
64 0.8 0.6 lineto
65 0.6 0.8 lineto
66 } def
67
68 /bishop {
69 0.75 0.4 moveto
70 0.5 0.4 0.25 0 360 arc
71 closepath
72 0.6 0.75 moveto
73 0.5 0.75 0.1 0 360 arc
74 closepath
75 } def
76
77 /rook {
78 0.3 0.15 moveto
79 0.7 0.15 lineto
80 0.7 0.85 lineto
81 0.3 0.85 lineto
82 closepath
83 } def
84
85 /s_general {
86 0.5 0.15 moveto
87 0.8 0.5 lineto
88 0.5 0.85 lineto
89 0.2 0.5 lineto
90 closepath
91 } def
92
93 /g_general {
94 0.2 0.15 moveto
95 0.8 0.15 lineto
96 0.8 0.5 lineto
97 0.5 0.85 lineto
98 0.2 0.5 lineto
99 closepath
100 } def
101
102 /king {
103 0.2 0.15 moveto
104 0.8 0.15 lineto
105 0.8 0.85 lineto
106 0.5 0.65 lineto
107 0.2 0.85 lineto
108 closepath
109 } def
110
111 gsave
112 0.75 0.5 translate
113 { pawn } mkpiece
114 { lance } mkpiece
115 grestore
116
117 gsave
118 0.75 2 translate
119 { knight } mkpiece
120 { bishop } mkpiece
121 grestore
122
123 gsave
124 0.75 3.5 translate
125 { rook } mkpiece
126 { s_general } mkpiece
127 grestore
128
129 gsave
130 0.75 5 translate
131 { g_general } mksingpiece
132 { king } mksingpiece
133 grestore
134
135 showpage