|
001 packagepackage is used to name the directory or folder a class is in Curtis;
002
003 importimport means to make the classes and/or packages available in this program wiki.Wiki;
004 importimport means to make the classes and/or packages available in this program fang.*;
005 importimport means to make the classes and/or packages available in this program java.awt.*;
006 importimport means to make the classes and/or packages available in this program java.awt.geom.*;
007
008 /**
009 * All about my game here.
010 * @authorthis is the Javadoc tag for documenting who created the source code Curtis S.
011 */
012 publicpublic is used to indicate unrestricted access (any other class can have access) classclass is a group of fields and methods used for making objects StriteMosaiCCSFinal extendsextends means to customize or extend the functionality of a class Game
013 {open braces start code blocks and must be matched with a close brace
014 /**sets up the game*/
015 publicpublic is used to indicate unrestricted access (any other class can have access) voidvoid means the method does not return a value setup()
016 {open braces start code blocks and must be matched with a close brace
017 OvalSprite oval=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor OvalSprite(1, 1);
018 oval.setSize(0.75);
019 oval.setLocation(0.5, 0.5);
020 oval.setColor(Palette.getColor("Aqua"));
021 addSprite(oval);
022
023 PolygonSprite poly=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor PolygonSprite(6);
024 poly.setColor(Palette.getColor("Beige"));
025 poly.setSize(0.25);
026 poly.setLocation(0.25, 0.25);
027 addSprite(poly);
028
029 PolygonSprite poly4=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor PolygonSprite(6);
030 poly4.setColor(Palette.getColor("Beige"));
031 poly4.setSize(0.25);
032 poly4.setLocation(0.75, 0.25);
033 addSprite(poly4);
034
035 PieSprite pie=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor PieSprite(1, 1, 45, 270);
036 pie.setColor(Palette.getColor("Thistle"));
037 pie.setSize(0.18);
038 pie.setLocation(0.75, 0.25);
039 addSprite(pie);
040
041 ArcSprite arc=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor ArcSprite(1, 1, 0, 180);
042 arc.setColor(Palette.getColor("Tomato"));
043 arc.setSize(0.18);
044 arc.setLocation(0.50, 0.50);
045 addSprite(arc);
046
047 LineSprite line=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor LineSprite(1, 1, 0, 1);
048 line.setSize(.75);
049 line.setLocation(0.5, 0.5);
050 addSprite(line);
051
052 StringSprite bye=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor StringSprite("Curtis");
053 bye.setSize(0.2);
054 bye.setLocation(0.8, 0.8);
055 addSprite(bye);
056
057 ImageSprite piccs=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor ImageSprite("Fresh2colorCS.png");
058 piccs.setSize(0.2);
059 piccs.setLocation(0.4, 0.6);
060 addSprite(piccs);
061
062 OvalSprite oval2=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor OvalSprite(2, 1);
063 oval2.setSize(0.3);
064 oval2.setLocation(0.5, 0.9);
065 oval2.setColor(Palette.getColor("Beige"));
066 addSprite(oval2);
067
068 PolygonSprite poly2=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor PolygonSprite(3);
069 poly2.setColor(Palette.getColor("Tomato"));
070 poly2.setSize(0.15);
071 poly2.setLocation(0.7, 0.9);
072 addSprite(poly2);
073
074 PolygonSprite poly3=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor PolygonSprite(3);
075 poly3.setColor(Palette.getColor("Tomato"));
076 poly3.setSize(0.15);
077 poly3.setLocation(0.3, 0.9);
078 addSprite(poly3);
079
080 RectangleSprite rect=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor RectangleSprite(3, 1);
081 rect.setColor(Palette.getColor("Tomato"));
082 rect.setSize(0.25);
083 rect.setLocation(0.5, 0.78);
084 addSprite(rect);
085
086 RectangleSprite rect2=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor RectangleSprite(2, 2);
087 rect2.setColor(Palette.getColor("Thistle"));
088 rect2.setSize(0.05);
089 rect2.setLocation(0.5, 0.5);
090 addSprite(rect2);
091
092 StringSprite rand=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor StringSprite("Random Freshness");
093 rand.setSize(0.4);
094 rand.setLocation(0.3, 0.1);
095 addSprite(rand);
096
097 PieSprite pie2=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor PieSprite(1, 1, 45, 270);
098 pie2.setColor(Palette.getColor("Thistle"));
099 pie2.setSize(0.1);
100 pie2.setLocation(0.25, 0.25);
101 addSprite(pie2);
102
103 ImageSprite piccs2=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor ImageSprite("DrawingCS.JPG");
104 piccs2.setSize(0.2);
105 piccs2.setLocation(0.1, 0.8);
106 addSprite(piccs2);
107
108 ArcSprite arc2=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor ArcSprite(1, 1, 90, 270);
109 arc2.setColor(Palette.getColor("Tomato"));
110 arc2.setSize(0.15);
111 arc2.setLocation(0.75, 0.50);
112 addSprite(arc2);
113
114 LineSprite line2=this assignment operator makes the left side equal to the right sidenewnew is used to create objects by calling the constructor LineSprite(1, 1, 1, 10);
115 line2.setSize(.6);
116 line2.setLineThickness(.2);
117 line2.setLocation(0.5, 0.5);
118 line2.setColor(Palette.getColor("Tomato"));
119 addSprite(line2);
120 }close braces end code blocks and must match an earlier open brace
121
122 }close braces end code blocks and must match an earlier open brace
|