|Up: CopyCat Table of Contents|
|Left: 3 Educational Value||Right: 5 What's new?|
CopyCat is made up of many components: PlayArea, BoardBox, Rotator, and Title. PlayArea (PlayArea.java) is the component where all the action occurs. It has a complex interface to handle all the players' manipulations of the solid object. PlayArea reports back to CopyCat (CopyCat.java) whenever the player does something significant.
BoardBox (BoardBox.java) is the part that shows the static original picture that the player must copy (I call it a board)--not much to it.
Rotator (Rotator.java) has the solid object rotating and bouncing in a non-repeating way. There is also a user interface where the player can grab the object and rotate it manually, but as soon as the player lets go, it returns to tumbling.
Title (Title.java) is a trival component that simply puts centred text in a box. It is used for the title and the score.
PlayArea and BoardBox rely on the object Board (Board.java). Board holds all the information of the board and has a few methods that relate to the board -- drawing the board, clearing the board, and counting the correct matches on the board.
PlayArea,Rotator and Board rely on the object Solid (Solid.java). Solid holds all the 3D information relating to the solid object and has a few methods as well.
PlayArea and Board rely on the object GroupGraph (GroupGraph.java). GroupGraph holds all the preferred orientation of the solid, how to get from one oriention to another, and the symmetries of the faces the of solid.
PlayArea, Rotator and Solid use the object Omatrix (Omatrix.java), the orthogonal/orientation matrices. Omatrix holds a matrix and has many matrix methods.
One of the most flexible parts to CopyCat is that it has very little hardwiring; all of the changeable information is read in with files: which object that is used, which group graph that is used, the screen setup, and the board. This saves oodles of time compiling, and will eventually lead to user interface where the user will run some application that produces these config files. A half measure that is implemented right now is that the board status can be retrieved from the System.out--this is a hidden feature so that non-techies won't get too excited.