-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtests_visual.ps
More file actions
executable file
·63 lines (43 loc) · 1.1 KB
/
tests_visual.ps
File metadata and controls
executable file
·63 lines (43 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
% Nicolas Seriot
% 2024-03-23
% https://github.com/nst/PSChess
% https://seriot.ch/projects/pschess.html
% gs -DNOSAFER tests_visual.ps
(drawing.ps) run
/RunVisualTests {
(TESTS) ==
10 dict begin
NewGame
/testBoard (\
r...k..K\
Ppn.p.np\
kK.b.Q..\
..b....n\
..p..rpb\
P.k...nn\
Bn.PbPnp\
R...K..R\
) def
(a) 0 get 1 (h) 0 get {
/col exch def
1 1 8 {
/row exch def
/fromCoord ( ) def
fromCoord 0 col put
fromCoord 1 row ( ) cvs putinterval
testBoard fromCoord fromCoord true _board_fc_tc_dry_Move_canMove_squaresStatus_msg_
/msg exch def
/possibleMoves exch def
/canMove exch def
possibleMoves fromCoord _coord_Index_i_ 3 put % origin in green
gsave
20 20 translate
possibleMoves testBoard _highlightIndices_board_DrawBoard
grestore
showpage
} for
} for
end
} def
<< /PageSize [400 400] >> setpagedevice
RunVisualTests