Kunstig Intelligens til Brætspillet Taiji - Danmarks Tekniske Universitet

Kunstig Intelligens til Brætspillet Taiji - Danmarks Tekniske Universitet Kunstig Intelligens til Brætspillet Taiji - Danmarks Tekniske Universitet

09.09.2013 Views

208 Bilag A [ 1 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 7 ] ) ; 127 i f ( tModel . noRows > 8) { 128 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 8 ] + ” ”+ n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 8 ] ) ; 129 130 } 131 } 132 } 133 } 134 } 135 } 136 System . out . p r i n t l n ( ) ; 137 } 138 } 139 140 // f o r b r a e t med 5 k o l o n e r 141 p u b l i c void p r i n t C h i l d r e n 5 x ( Node n ) { 142 System . out . p r i n t l n (” t P r i n t P r i n t Children ”+n ) ; 143 f o r ( i n t i =0; i 3) { 150 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 3 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 3 ] ) ; 151 i f ( tModel . noRows > 4) {

A.15 TaijiPrint.java 209 152 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 4 ] ) ; 153 i f ( tModel . noRows > 5) { 154 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 5 ] ) ; 155 i f ( tModel . noRows > 6) { 156 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 6 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 6 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 6 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 6 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 6 ] ) ; 157 i f ( tModel . noRows > 7) { 158 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 7 ] ) ; 159 i f ( tModel . noRows > 8) { 160 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard [ 0 ] [ 8 ] + ” ”+ n . c h i l d r e n . get ( i ) . nodeBoard [ 1 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 2 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard [ 4 ] [ 8 ] ) ; 161 162 } 163 } 164 } 165 } 166 } 167 } 168 System . out . p r i n t l n ( ) ; 169 } 170 } 171 172 // f o r b r a e t med 6 k o l o n e r 173 p u b l i c void p r i n t C h i l d r e n 6 x ( Node n ) { 174 System . out . p r i n t l n (” t P r i n t P r i n t Children ”+n ) ; 175 f o r ( i n t i =0; i

A.15 <strong>Taiji</strong>Print.java 209<br />

152 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) . nodeBoard<br />

[ 0 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />

[ 1 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />

[ 2 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />

[ 3 ] [ 4 ] + ” ”+n . c h i l d r e n . get ( i ) . nodeBoard<br />

[ 4 ] [ 4 ] ) ;<br />

153 i f ( tModel . noRows > 5) {<br />

154 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) .<br />

nodeBoard [ 0 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />

nodeBoard [ 1 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />

nodeBoard [ 2 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />

nodeBoard [ 3 ] [ 5 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />

nodeBoard [ 4 ] [ 5 ] ) ;<br />

155 i f ( tModel . noRows > 6) {<br />

156 System . out . p r i n t l n ( n . c h i l d r e n . get ( i ) .<br />

nodeBoard [ 0 ] [ 6 ] + ” ”+n . c h i l d r e n . get (<br />

i ) . nodeBoard [ 1 ] [ 6 ] + ” ”+n . c h i l d r e n .<br />

get ( i ) . nodeBoard [ 2 ] [ 6 ] + ” ”+n .<br />

c h i l d r e n . get ( i ) . nodeBoard [ 3 ] [ 6 ] + ”<br />

”+n . c h i l d r e n . get ( i ) . nodeBoard<br />

[ 4 ] [ 6 ] ) ;<br />

157 i f ( tModel . noRows > 7) {<br />

158 System . out . p r i n t l n ( n . c h i l d r e n . get ( i<br />

) . nodeBoard [ 0 ] [ 7 ] + ” ”+n .<br />

c h i l d r e n . get ( i ) . nodeBoard<br />

[ 1 ] [ 7 ] + ” ”+n . c h i l d r e n . get ( i ) .<br />

nodeBoard [ 2 ] [ 7 ] + ” ”+n . c h i l d r e n .<br />

get ( i ) . nodeBoard [ 3 ] [ 7 ] + ” ”+n .<br />

c h i l d r e n . get ( i ) . nodeBoard<br />

[ 4 ] [ 7 ] ) ;<br />

159 i f ( tModel . noRows > 8) {<br />

160 System . out . p r i n t l n ( n . c h i l d r e n .<br />

get ( i ) . nodeBoard [ 0 ] [ 8 ] + ” ”+<br />

n . c h i l d r e n . get ( i ) . nodeBoard<br />

[ 1 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i<br />

) . nodeBoard [ 2 ] [ 8 ] + ” ”+n .<br />

c h i l d r e n . get ( i ) . nodeBoard<br />

[ 3 ] [ 8 ] + ” ”+n . c h i l d r e n . get ( i<br />

) . nodeBoard [ 4 ] [ 8 ] ) ;<br />

161<br />

162 }<br />

163 }<br />

164 }<br />

165 }<br />

166 }<br />

167 }<br />

168 System . out . p r i n t l n ( ) ;<br />

169 }<br />

170 }<br />

171<br />

172 // f o r b r a e t med 6 k o l o n e r<br />

173 p u b l i c void p r i n t C h i l d r e n 6 x ( Node n ) {<br />

174 System . out . p r i n t l n (” t P r i n t P r i n t Children ”+n ) ;<br />

175 f o r ( i n t i =0; i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!