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 package com.buckosoft.fibs.domain;
48
49 import org.junit.Ignore;
50
51 import com.buckosoft.fibs.domain.Board;
52
53
54
55
56
57
58
59
60
61 @Ignore
62 public class DumpBoard {
63 static String s0 = "board:bucko:BuckoFIBS:1:0:0:0:-2:0:0:0:0:5:0:3:0:0:0:-5:5:0:0:0:-3:0:-5:0:0:0:0:2:0:-1:-1:-1:3:5:1:1:1:0:1:-1:0:25:0:0:0:0:0:0:0:0";
64 static String t0 = "board:bucko:dickbalaska:3:0:1:0:0:0:-1:2:2:3:0:2:0:0:0:-4:5:-1:0:0:-2:0:-4:-3:0:0:0:1:0:1:0:0:0:0:1:1:1:0:1:-1:0:25:0:0:0:0:2:0:0:0";
65 static String t1 = "board:You:BuckoFIBS:5:0:0:0:-2:0:0:0:0:5:0:3:0:0:0:-5:5:0:0:0:-3:0:-5:0:0:0:0:2:0:1:0:0:3:6:1:1:1:0:-1:1:25:0:0:0:0:0:0:0:0:0";
66 static String t2 = "board:You:dickbalaska:5:4:1:-1:-2:0:0:0:0:5:2:2:2:0:0:-2:2:0:0:0:-2:-2:-5:-2:1:0:0:0:2:1:3:2:0:0:2:1:0:0:1:-1:0:25:0:0:1:0:2:0:0:0";
67
68 static String t3 = "You:BuckoFIBS:5:0:0:-1:2:-2:2:2:2:2:2:3:0:0:0:0:0:0:0:0:0:0:0:0:-1:-2:-4:-6:1:-1:2:2:0:0:2:1:0:0:-1:1:25:0:0:0:0:0:4:0:0:0";
69 static String t4 = "board:BuckoFIBS:dickbalaska:3:0:0:0:-2:0:0:0:0:5:0:3:0:0:0:-5:5:0:0:0:-3:0:-5:0:0:0:0:2:0:-1:3:1:0:0:1:1:1:0:-1:1:25:0:0:0:0:0:2:0:0:0";
70 static String t5 = "board:You:dickbalaska:5:4:3:0:-2:0:0:0:0:5:2:2:0:0:0:-5:4:0:0:0:-2:0:-4:0:-2:0:0:2:0:1:1:5:0:0:1:0:0:0:1:-1:0:25:0:0:0:0:2:0:0:0";
71
72 static String t6 = "board:You:tigergammon_bot_III:3:0:0:0:-1:1:0:0:0:5:0:2:0:0:0:-3:7:0:0:0:-5:0:-2:0:0:-2:0:-2:0:1:0:0:0:0:2:1:0:1:1:-1:0:25:0:0:0:0:2:0:0:0";
73
74 public static void main(String[] args) {
75 printBoard(t4);
76 printBoard(t6);
77 }
78
79 private static void printBoard(String s) {
80 System.out.println("********************************");
81 Board b = new Board();
82 b.parseFibsBoard(s, true);
83 System.out.println(s);
84 System.out.println("pl1=" + b.getPlayerName()[0] + " pl2=" + b.getPlayerName()[1]);
85 System.out.println("match len= " + b.getMatchLength());
86 System.out.println("match score= " + b.getMatchScore()[0] + "-" + b.getMatchScore()[1]);
87 StringBuffer sb = new StringBuffer();
88 for (int i=1; i<25; i++) {
89 if (i != 1)
90 sb.append(":");
91 sb.append(b.getPoints()[i]);
92 }
93 System.out.println(sb.toString());
94 System.out.println("board 0/25 =" + b.getPoints()[0] + "/" + b.getPoints()[25]);
95 System.out.println("Turn= " + b.getWhosTurn() + " turn"
96 + (b.getWhosTurn() == Board.turnX ? "X" : "O"));
97 int[][] dice = b.getDice();
98 System.out.println("dice= " + dice[0][0] + "-" + dice[0][1] + " " + dice[1][0] + "-" + dice[1][1]);
99 System.out.println("cube= " + b.getCube() + " hasCube=" + b.getHasCube()) ;
100 System.out.println("may double you= " + b.isYouMayDouble() + " opp=" + b.isOpponentMayDouble());
101 System.out.println("color= " + b.getXO() + " dir=" + b.getDirection());
102 System.out.println("home=" + b.getHome()[0] + "/" + b.getHome()[1] + " bar=" + b.getBar()[0] + "/"+ b.getBar()[1]);
103 System.out.println("canMove=" + b);
104 System.out.println("");
105
106 }
107 }