1 fuseki: proc (bd, inf, suminf, vf, n_moves);
 2 
 3 /* Coded by REM Jun 73 */
 4 
 5 dcl (bd (19, 19),
 6      inf (19, 19),
 7      suminf (19, 19),
 8      vf (19, 19),
 9      n_moves) fixed bin;
10 
11 dcl (take_corner init (35),
12      shimari init (18),
13      kakari init (25)
14      ) fixed bin int static options (constant);
15 
16 dcl (i, j) fixed bin;
17 
18 dcl  thre4 (19) bit (1) int static options (constant) init
19     ("0"b, "0"b, "1"b, "1"b, "0"b, "0"b, "0"b, "0"b, "0"b, "0"b, "0"b, "0"b, "0"b, "0"b, "0"b, "1"b, "1"b, "0"b, "0"b);
20 
21 dcl  five6 (19) bit (1) int static options (constant) init
22     ("0"b, "0"b, "0"b, "0"b, "1"b, "1"b, "0"b, "0"b, "0"b, "0"b, "0"b, "0"b, "0"b, "1"b, "1"b, "0"b, "0"b, "0"b, "0"b);
23 
24           do i = 1 to 19; do j = 1 to 19; if bd (i, j) = 0 then do;
25 
26                          if thre4 (i) then if thre4 (j) then do;
27                                    if suminf (i, j) <= 6 then vf (i, j) = take_corner;
28                               end;
29 
30                          if (thre4 (i) & five6 (j)) | (five6 (i) & thre4 (j)) then do;
31                               if suminf (i, j) = 6 then do;
32                                    if inf (i, j) = -6 then vf (i, j) = kakari;
33                                    if inf (i, j) = 6 then vf (i, j) = shimari;
34                               end;
35                          end;
36           end; end; end;
37 
38 
39           do i = 1 to 19;do j = 1 to 19;
40                     if i = 3 then go to doit;
41                     if j = 3 then go to doit;
42                     if i = 17 then go to doit;
43                     if j = 17 then go to doit;
44                     go to dont_doit;
45 
46 doit:
47                     if i >= 3 then if j >= 3 then if i <= 17 then if j <= 17 then do;
48                                         if suminf (i, j) <= 13 then
49                                              vf (i, j) = vf (i, j) + 18 - suminf (i, j);
50                                    end;
51 dont_doit:
52           end;end;
53      end fuseki;