09.09.2013 Views

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

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

218 Bilag A<br />

326 p u b l i c void printNode3x ( Node n ) {<br />

327 System . out . p r i n t l n (” t P r i n t PrintNode ”+n+” Depth : ”+n . d+”<br />

Score ”+n . a+” par ”+n . par+” w ”+n . wc+”,”+n . wr+” b ”+n .<br />

bc+”,”+n . br+” c h i l d r e n : ”+n . c h i l d r e n ) ;<br />

328 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 0 ] + ” ”+n . nodeBoard<br />

[ 1 ] [ 0 ] + ” ”+n . nodeBoard [ 2 ] [ 0 ] ) ;<br />

329 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 1 ] + ” ”+n . nodeBoard<br />

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

330 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 2 ] + ” ”+n . nodeBoard<br />

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

331 i f ( tModel . noRows > 3) {<br />

332 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 3 ] + ” ”+n . nodeBoard<br />

[ 1 ] [ 3 ] + ” ”+n . nodeBoard [ 2 ] [ 3 ] ) ;<br />

333 i f ( tModel . noRows > 4) {<br />

334 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 4 ] + ” ”+n .<br />

nodeBoard [ 1 ] [ 4 ] + ” ”+n . nodeBoard [ 2 ] [ 4 ] ) ;<br />

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

336 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 5 ] + ” ”+n .<br />

nodeBoard [ 1 ] [ 5 ] + ” ”+n . nodeBoard [ 2 ] [ 5 ] ) ;<br />

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

338 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 6 ] + ” ”+n .<br />

nodeBoard [ 1 ] [ 6 ] + ” ”+n . nodeBoard [ 2 ] [ 6 ] ) ;<br />

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

340 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 7 ] + ”<br />

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

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

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

342 System . out . p r i n t l n ( n . nodeBoard<br />

[ 0 ] [ 8 ] + ” ”+n . nodeBoard [ 1 ] [ 8 ] + ”<br />

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

343<br />

344<br />

345 }<br />

346 }<br />

347 }<br />

348 }<br />

349 }<br />

350 }<br />

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

352 }<br />

353<br />

354 // f o r b r a e t med 4 k o l o n e r<br />

355 p u b l i c void printNode4x ( Node n ) {<br />

356 System . out . p r i n t l n (” t P r i n t PrintNode ”+n+” Depth : ”+n . d+”<br />

Score ”+n . a+” par ”+n . par+” w ”+n . wc+”,”+n . wr+” b ”+n .<br />

bc+”,”+n . br+” c h i l d r e n : ”+n . c h i l d r e n ) ;<br />

357 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 0 ] + ” ”+n . nodeBoard<br />

[ 1 ] [ 0 ] + ” ”+n . nodeBoard [ 2 ] [ 0 ] + ” ”+n . nodeBoard [ 3 ] [ 0 ] ) ;<br />

358 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 1 ] + ” ”+n . nodeBoard<br />

[ 1 ] [ 1 ] + ” ”+n . nodeBoard [ 2 ] [ 1 ] + ” ”+n . nodeBoard [ 3 ] [ 1 ] ) ;<br />

359 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 2 ] + ” ”+n . nodeBoard<br />

[ 1 ] [ 2 ] + ” ”+n . nodeBoard [ 2 ] [ 2 ] + ” ”+n . nodeBoard [ 3 ] [ 2 ] ) ;<br />

360 i f ( tModel . noRows > 3) {<br />

361 System . out . p r i n t l n ( n . nodeBoard [ 0 ] [ 3 ] + ” ”+n . nodeBoard<br />

[ 1 ] [ 3 ] + ” ”+n . nodeBoard [ 2 ] [ 3 ] + ” ”+n . nodeBoard [ 3 ] [ 3 ] )

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

Saved successfully!

Ooh no, something went wrong!