Upload
kh-gh
View
213
Download
0
Embed Size (px)
DESCRIPTION
Flag Lab
Citation preview
public static void flagOfFrance (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++){
int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (x < 333) {
Expo.setColor(g,Expo.blue);}
if (x >= 333 && x < 667) {
Expo.setColor(g,Expo.white);}
if (x >= 667) {
Expo.setColor(g,Expo.red);}
drawDot(g,x,y);}showName(g,"France");
}
public static void flagOfLithuania (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++){
int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (y < 217) {
Expo.setColor(g,Expo.yellow);}
if (y >= 217 && y < 434) {
Expo.setColor(g,Expo.green);}
if (y >= 434) {
Expo.setColor(g,Expo.red);}
drawDot(g,x,y);}showName(g,"Lithuania");
}
public static void flagOfLatvia (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++){
int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (y < 217) {
Expo.setColor(g,Expo.violet);}
if (y >= 217 && y < 434) {
Expo.setColor(g,Expo.white);}
if (y >= 434) {
Expo.setColor(g,Expo.violet);}
drawDot(g,x,y);}showName(g,"Latvia");
}
public static void flagOfColombia (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++){
int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (y < 325) {
Expo.setColor(g,Expo.gold);}
if (y >= 325 && y <488) {
Expo.setColor(g,Expo.blue);}
if (y >= 488) {
Expo.setColor(g,Expo.red);}
drawDot(g,x,y);}showName(g,"Colombia");
}
public static void rainbowFlag (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++){
int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (y < 109) {
Expo.setColor(g,Expo.red);}
if (y >= 109 && y < 217) {
Expo.setColor(g,Expo.orange);}
if (y >= 217 && y < 325) {
Expo.setColor(g,Expo.yellow);}
if (y >= 325 && y < 433) {
Expo.setColor(g,Expo.green);}
if (y >= 433 && y < 541) {
Expo.setColor(g,Expo.blue);}
if (y >= 541) {
Expo.setColor(g,Expo.purple);}
drawDot(g,x,y);}showName(g,"Rainbow");
}
public static void flagOfSweden (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++){
int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (y < 275) {
Expo.setColor(g,Expo.blue);}
if (y >= 275 && y < 375) {
Expo.setColor(g,Expo.yellow);}
if (y >= 375) {
Expo.setColor(g,Expo.blue);}
if (x >= 300 && x <= 400){
Expo.setColor(g,Expo.yellow);}
drawDot(g,x,y);}showName(g,"Sweden");
}
public static void flagOfUSA (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++)
{ int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (y < 50) {
Expo.setColor(g,Expo.red);}
if (y >= 50 && y < 100) {
Expo.setColor(g,Expo.white);}
if (y >= 100 && y < 150) {
Expo.setColor(g,Expo.red);}
if (y >= 150 && y <= 200){
Expo.setColor(g,Expo.white);}
if (y >= 200 && y <= 250){
Expo.setColor(g,Expo.red);}
if (y >= 250 && y <= 300){
Expo.setColor(g,Expo.white);}
if (y >= 300 && y <= 350){
Expo.setColor(g,Expo.red);}
if (y >= 350 && y <= 400){
Expo.setColor(g,Expo.white);}
if (y >= 400 && y <= 450){
Expo.setColor(g,Expo.red);}
if (y >= 450 && y <= 500){
Expo.setColor(g,Expo.white);}
if (y >= 500 && y <= 550){
Expo.setColor(g,Expo.red);}
if (y >= 550 && y <= 600){
Expo.setColor(g,Expo.white);}
if (y >= 600){
Expo.setColor(g,Expo.red);}
if (x <= 350 && y <= 350){
Expo.setColor(g,Expo.blue);}
drawDot(g,x,y);}showName(g,"USA");
}
public static void flagOfSwitzerland (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++){
int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (y < 275) {
Expo.setColor(g,Expo.red);}
if (y >= 275 && y < 375) {
Expo.setColor(g,Expo.white);}
if (y >= 375) {
Expo.setColor(g,Expo.red);}
if (x >= 400 && x <= 600){
Expo.setColor(g,Expo.white);}
if (y <= 125){
Expo.setColor(g,Expo.red);}
if (y >= 525){
Expo.setColor(g,Expo.red);}
if (x <= 225){
Expo.setColor(g,Expo.red);}
if (x >= 775){
Expo.setColor(g,Expo.red);}
drawDot(g,x,y);}showName(g,"Switzerland");
}
public static void flagOfTexas (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++){
int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (y < 325) {
Expo.setColor(g,Expo.white);}
if (y >= 325) {
Expo.setColor(g,Expo.red);}
if (x < 350){
Expo.setColor(g,Expo.blue);}
drawDot(g,x,y);}showName(g,"Texas");
}
public static void flagOfRussia (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++){
int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (y < 217) {
Expo.setColor(g,Expo.white);}
if (y >= 217 && y < 434) {
Expo.setColor(g,Expo.lightBlue);}
if (y >= 434) {
Expo.setColor(g,Expo.red);}
drawDot(g,x,y);}showName(g,"Russia");
}
public static void flagOfFinland (Graphics g){
Expo.setBackground(g,Expo.black);for (int d = 1; d <= numDots; d++){
int x = Expo.random(0,1000); int y = Expo.random(0,650);
if (y < 275) {
Expo.setColor(g,Expo.white);}
if (y >= 275 && y < 375) {
Expo.setColor(g,Expo.blue);}
if (y >= 375) {
Expo.setColor(g,Expo.white);}
if (x >= 300 && x <= 400){
Expo.setColor(g,Expo.blue);}
drawDot(g,x,y);}showName(g,"Finland");
}