Advertisement
Avatarr

face

Nov 28th, 2011
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 1.63 KB | None | 0 0
  1.  
  2. import java.awt.Color;
  3.  
  4.  
  5. public class Rubic {
  6.    
  7.     private Color[][][] Cell;
  8.     private Color[] CellMainColor = new Color[6];
  9.     private int rublcFace[] = new int [6];
  10.    
  11.     public Rubic() {
  12.         rublcFace[0] = 0;
  13.         rublcFace[1] = 1;
  14.         rublcFace[2] = 2;
  15.         rublcFace[3] = 3;
  16.         rublcFace[4] = 4;
  17.         rublcFace[5] = 5;
  18.         this.Cell = new Color[3][3][6];
  19.         this.CellMainColor[0] = Color.white;
  20.         this.CellMainColor[1] = Color.red;
  21.         this.CellMainColor[2] = Color.green;
  22.         this.CellMainColor[3] = Color.blue;
  23.         this.CellMainColor[4] = Color.orange;
  24.         this.CellMainColor[5] = Color.yellow;
  25.        
  26.         for(int k=0; k<6; k++) {
  27.             for(int j=0; j<3; j++) {
  28.                 for(int i=0; i<3; i++) {
  29.                     this.Cell[i][j][k] = this.CellMainColor[k];
  30.                    
  31.                 }
  32.             }
  33.         }
  34.        
  35.     }
  36.  
  37.     /**
  38.      * @return the Cell
  39.      */
  40.     public Color getSpecificCell(int i,int j,int k) {
  41.         return this.Cell[i][j][k];
  42.     }
  43.                
  44.     public Color[][][] getCell() {
  45.         return Cell;
  46.     }
  47.  
  48.     /**
  49.      * @param Cell the Cell to set
  50.      */
  51.     public void setCell(Color[][][] Cell) {
  52.         this.Cell = Cell;
  53.     }
  54.  
  55.     /**
  56.      * @return the CellMainColor
  57.      */
  58.     public Color[] getCellMainColor() {
  59.         return CellMainColor;
  60.     }
  61.  
  62.     /**
  63.      * @param CellMainColor the CellMainColor to set
  64.      */
  65.     public void setCellMainColor(Color[] CellMainColor) {
  66.         this.CellMainColor = CellMainColor;
  67.     }
  68.    
  69.    
  70.    
  71.    
  72. }
  73.  
  74.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement