Java Doc for Board.java in  » 6.0-JDK-Modules » java-3d » org » jdesktop » j3d » examples » four_by_four » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » org.jdesktop.j3d.examples.four_by_four 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jdesktop.j3d.examples.four_by_four.Board

Board
class Board (Code)
Class: Board Description: Handles all logic with respect to play. Also renders the 2D window. Version: 1.1


Field Summary
final static  intEND
    
final static  intHUMAN
    
final static  intMACHINE
    
final static  intUNOCCUPIED
    

Constructor Summary
 Board(FourByFour panel, Positions positions, int width, int height)
    

Method Summary
public  booleanblock_central_four()
    
public  booleanblock_chair_move()
    
public  booleanblock_inside_four()
    
public  booleanblock_intersecting_rows()
     Check for a forced win by intersecting rows.
public  booleanblock_outside_four()
    
public  booleanblock_walk_move()
    
public  booleanblock_winning_move()
     Check for a winning move.
public  voidchange_face()
    
public  voidcheckSelection2D(int x, int y, int player)
     Determine what position has been selected in the 2D window.
public  booleancheck_chair_move()
    
public  booleancheck_face_three()
     Check each face for a forced win.
public  booleancheck_for_two()
     Check for a forced win by intersecting rows.
public  booleancheck_intersecting_rows2()
     Check for a forced win by intersecting rows.
public  booleancheck_outside_four()
     Check occupancy of outside four.
public  voidchoose_move()
     Determine the computer's move.
public  voidinit_combinations()
    
public  voidinit_faces()
     Initialize the "faces" array.
public  voidinit_inside_four()
     Initialize the "inside four" array.
public  voidinit_outside_four()
     Initialize the "outside four" array.
public  voidlabel()
    
public  voidnewGame()
     Start a new game.
public  booleanpick_7()
    
public  voidpick_best_position()
     Pick the computer's best possible move based on the number of combinations per position.
public  voidrender2D(Graphics gc)
     Render the current face set in the 2D window.
public  voidselection(int pos, int player)
     Record the player's move.
public  voidsetCanvas(Canvas2D canvas)
    
public  voidset_skill_level(int level)
     Set the skill level.
public  voidsetup_pos_to_comb()
     Set up the pos_to_comb array.
public  booleantake_inside_four()
    
public  booleantake_outside_four()
    
public  voidundo_move()
    
public  booleanunoccupied(int pos)
    
public  voidupdate_best_picks()
     Update the best_picks array.
public  intupdate_logic_arrays(int pos)
     Update the logic arrays that keep track of positions and status.

Field Detail
END
final static int END(Code)



HUMAN
final static int HUMAN(Code)



MACHINE
final static int MACHINE(Code)



UNOCCUPIED
final static int UNOCCUPIED(Code)




Constructor Detail
Board
Board(FourByFour panel, Positions positions, int width, int height)(Code)




Method Detail
block_central_four
public boolean block_central_four()(Code)
Block central four



block_chair_move
public boolean block_chair_move()(Code)



block_inside_four
public boolean block_inside_four()(Code)
Block inside four



block_intersecting_rows
public boolean block_intersecting_rows()(Code)
Check for a forced win by intersecting rows. Block if necessary.



block_outside_four
public boolean block_outside_four()(Code)
Block outside four



block_walk_move
public boolean block_walk_move()(Code)



block_winning_move
public boolean block_winning_move()(Code)
Check for a winning move.



change_face
public void change_face()(Code)



checkSelection2D
public void checkSelection2D(int x, int y, int player)(Code)
Determine what position has been selected in the 2D window.



check_chair_move
public boolean check_chair_move()(Code)



check_face_three
public boolean check_face_three()(Code)
Check each face for a forced win.



check_for_two
public boolean check_for_two()(Code)
Check for a forced win by intersecting rows. Block if necessary.



check_intersecting_rows2
public boolean check_intersecting_rows2()(Code)
Check for a forced win by intersecting rows. Block if necessary.



check_outside_four
public boolean check_outside_four()(Code)
Check occupancy of outside four.



choose_move
public void choose_move()(Code)
Determine the computer's move.



init_combinations
public void init_combinations()(Code)



init_faces
public void init_faces()(Code)
Initialize the "faces" array.



init_inside_four
public void init_inside_four()(Code)
Initialize the "inside four" array.



init_outside_four
public void init_outside_four()(Code)
Initialize the "outside four" array.



label
public void label()(Code)



newGame
public void newGame()(Code)
Start a new game.



pick_7
public boolean pick_7()(Code)



pick_best_position
public void pick_best_position()(Code)
Pick the computer's best possible move based on the number of combinations per position. Choose the position with the most combinations.



render2D
public void render2D(Graphics gc)(Code)
Render the current face set in the 2D window.



selection
public void selection(int pos, int player)(Code)
Record the player's move.



setCanvas
public void setCanvas(Canvas2D canvas)(Code)



set_skill_level
public void set_skill_level(int level)(Code)
Set the skill level.



setup_pos_to_comb
public void setup_pos_to_comb()(Code)
Set up the pos_to_comb array.



take_inside_four
public boolean take_inside_four()(Code)
Take inside four



take_outside_four
public boolean take_outside_four()(Code)
Take outside four



undo_move
public void undo_move()(Code)



unoccupied
public boolean unoccupied(int pos)(Code)



update_best_picks
public void update_best_picks()(Code)
Update the best_picks array.



update_logic_arrays
public int update_logic_arrays(int pos)(Code)
Update the logic arrays that keep track of positions and status. If we have a winner, stop the game.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.