Revision b4223a92
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java | ||
---|---|---|
759 | 759 |
|
760 | 760 |
public String getObjectName() |
761 | 761 |
{ |
762 |
switch(getNumLayers()[0]) |
|
762 |
int[] numLayers = getNumLayers(); |
|
763 |
|
|
764 |
switch(intGetObjectType(numLayers)) |
|
763 | 765 |
{ |
764 |
case 2: return "Pocket Cube"; |
|
765 |
case 3: return "Rubik Cube"; |
|
766 |
case 4: return "Rubik's Revenge"; |
|
767 |
case 5: return "Professor's Cube"; |
|
768 |
case 6: return "6x6 Cube"; |
|
769 |
case 7: return "7x7 Cube"; |
|
766 |
case CUBE_2: return "Pocket Cube"; |
|
767 |
case CU_232: return "Slim Tower"; |
|
768 |
case CUBE_3: return "Rubik Cube"; |
|
769 |
case CU_323: return "2x2x3 Cuboid"; |
|
770 |
case CU_343: return "3x3x4 Cuboid"; |
|
771 |
case CUBE_4: return "Rubik's Revenge"; |
|
772 |
case CUBE_5: return "Professor's Cube"; |
|
773 |
case CUBE_6: return "6x6 Cube"; |
|
774 |
case CUBE_7: return "7x7 Cube"; |
|
770 | 775 |
} |
771 | 776 |
return "Rubik Cube"; |
772 | 777 |
} |
... | ... | |
775 | 780 |
|
776 | 781 |
public String getInventor() |
777 | 782 |
{ |
778 |
switch(getNumLayers()[0]) |
|
783 |
int[] numLayers = getNumLayers(); |
|
784 |
|
|
785 |
switch(intGetObjectType(numLayers)) |
|
779 | 786 |
{ |
780 |
case 2: return "Larry Nichols"; |
|
781 |
case 3: return "Ernő Rubik"; |
|
782 |
case 4: return "Péter Sebestény"; |
|
783 |
case 5: return "Udo Krell"; |
|
784 |
case 6: |
|
785 |
case 7: return "Panagiotis Verdes"; |
|
787 |
case CUBE_2: return "Larry Nichols"; |
|
788 |
case CU_232: return "Katsuhiko Okamoto"; |
|
789 |
case CUBE_3: return "Ernő Rubik"; |
|
790 |
case CU_323: return "Unknown"; |
|
791 |
case CU_343: return "Cube4You"; |
|
792 |
case CUBE_4: return "Péter Sebestény"; |
|
793 |
case CUBE_5: return "Udo Krell"; |
|
794 |
case CUBE_6: |
|
795 |
case CUBE_7: return "Panagiotis Verdes"; |
|
786 | 796 |
} |
797 |
|
|
787 | 798 |
return "Ernő Rubik"; |
788 | 799 |
} |
789 | 800 |
|
... | ... | |
791 | 802 |
|
792 | 803 |
public int getYearOfInvention() |
793 | 804 |
{ |
794 |
switch(getNumLayers()[0]) |
|
805 |
int[] numLayers = getNumLayers(); |
|
806 |
|
|
807 |
switch(intGetObjectType(numLayers)) |
|
795 | 808 |
{ |
796 |
case 2: return 1970; |
|
797 |
case 3: return 1974; |
|
798 |
case 4: return 1981; |
|
799 |
case 5: return 2002; |
|
800 |
case 6: |
|
801 |
case 7: return 2008; |
|
809 |
case CUBE_2: return 1970; |
|
810 |
case CU_232: return 2001; |
|
811 |
case CUBE_3: return 1974; |
|
812 |
case CU_323: return 0; |
|
813 |
case CU_343: return 2009; |
|
814 |
case CUBE_4: return 1981; |
|
815 |
case CUBE_5: return 2002; |
|
816 |
case CUBE_6: |
|
817 |
case CUBE_7: return 2008; |
|
802 | 818 |
} |
819 |
|
|
803 | 820 |
return 1974; |
804 | 821 |
} |
805 | 822 |
|
... | ... | |
807 | 824 |
|
808 | 825 |
public int getComplexity() |
809 | 826 |
{ |
810 |
switch(getNumLayers()[0]) |
|
827 |
int[] numLayers = getNumLayers(); |
|
828 |
|
|
829 |
switch(intGetObjectType(numLayers)) |
|
811 | 830 |
{ |
812 |
case 2: return 4; |
|
813 |
case 3: return 6; |
|
814 |
case 4: return 8; |
|
815 |
default: return 10; |
|
831 |
case CUBE_2: |
|
832 |
case CU_232: return 1; |
|
833 |
case CUBE_3: |
|
834 |
case CU_323: return 2; |
|
835 |
case CU_343: |
|
836 |
case CUBE_4: return 3; |
|
837 |
case CUBE_5: |
|
838 |
case CUBE_6: |
|
839 |
case CUBE_7: return 4; |
|
816 | 840 |
} |
841 |
return 2; |
|
817 | 842 |
} |
818 | 843 |
} |
Also available in: Unified diff
Progress with ConfigPane.