Quick Search


Tibetan singing bowl music,sound healing, remove negative energy.

528hz solfreggio music -  Attract Wealth and Abundance, Manifest Money and Increase Luck



 
Your forum announcement here!

  Free Advertising Forums | Free Advertising Board | Post Free Ads Forum | Free Advertising Forums Directory | Best Free Advertising Methods | Advertising Forums > Other Methods of FREE Advertising > Guest Books Directory

Guest Books Directory Here is a great way to get some inbound links to your site, and message heard by people who also post and read these books. (Tip: Dont use your real email address on them)

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 08-07-2011, 10:43 PM   #1
Q1u4r8a9n
 
Posts: n/a
Default java {apt} {jot} the Battle City ...

import java.awt .*;
import javax.sway .*;
import java.awt.accident .*;
import java.util.EventListener;
public class HsTank2 extends JFrame {
HsTank2 (String title) {
this.setTitle (caption);
this.setSize (608, 630);
this.setLocation (300, 100);
this.setBackground (Color. WHITE);
MyTank mp = new MyTank ();
this.add (mp);
this.addKeyListener (mp);
new Thread (mp). start ();
}
public static void cardinal (String [] args)
HsTank2 h = new HsTank2 (

/ / main battle tank
class MyTank extends JPanel implements KeyListener, Runnable {
int x = 280, y = 280; / / initial location of the tank
int op = 1 ; / / instruction of manoeuvre of the tank
int color = 0;
int tankspeed = 8; / / tank speed
int tankbullet = 8; / / tank bullet speed
int tankfbullet = 4; / / enemy bullet speed
int shengming = 100; / / Life
int fenshu = 0;
int nandu = 5; / / Set the game difficulty
/ / bullet
int dx = 295, dy = 295;
int dx1 = 295, dy1 = -10;
int dx2 = 600, dy2 = 295;
int dx3 = 295, dy3 = 600; ;
int dx4 = -10, dy4 = 295;
/ / enemy tanks
int num = 10; / / digit of enemy tanks, can not adjust
int [ ,],[int [num];
int [] dyf = current int [num];
int [] dxf1 = new int [num];
int [] dyf1 = new int [num];
int [] dxf2 = new int [num];
int [] dyf2 = new int [num];
int [] dxf3 = new int [num];
int [] dyf3 = new int [ ,],[br> MyTank () {
for (int i = 0; i = 560)
x = x - tankspeed;
dx = dx - tankspeed;

}
if (e.getKeyCode () == KeyEvent.VK_DOWN) {
op = 3;
y = y + tankspeed;
dy = dy + tankspeed;
if (y> = 560)
y = y - tankspeed ;
dy = dy - tankspeed;

}
if (e.getKeyCode () == KeyEvent.VK_LEFT) {
op = 4;
x = x - tankspeed ;
dx = dx - tankspeed;
if (x y +8 & & dxf1-x> -10 & & dxf1-x -10 & & dyf2 - y y +2 & & dyf3 -10 & & dxf3-x
if (dxf4> x +8 & & dxf4 -10 & & dyf4 - y yf +8 & & dx1-xf> -10 & & dx1-xf xf +2 & & dx2 -10 & & dy2 - yf yf +2 & & dy3 -10 & & dx3-xf xf +8 & & dx4 -10 & & dy4 - yf = 560)
xf -;
dxf -;
;
}
break;
}

case 3: {
yf + +;
dyf + +;

for (int s = 0; s ; = 560)
yf -;
dyf - ;

}
break;
}

case 4: {
xf -;
dxf -;

for (int s = 0; s 0.5) {
for (int i = 0; i 0.5) {
for (int i = 2; i 0.5) {
for (int i = 4; i 0.5) {
for (int i = 6; i 0.5) {
for (int i = 8; i 0.5) {
if (Math.random ()> 0.5 )
opf = 1;
else
opf = 2;

} else {
if (Math.random ()> 0.5)
opf = 3;
else
opf = 4;

}
}
}
if (a% 50 == 11) {
/ / random movement of tanks
for (int i = 2; i 0.5) {
if (Math.random ()> 0.5 )
opf = 1;
else
opf = 2;

} else {
if (Math.random ()> 0.5)
opf = 3;
else
opf = 4;

}
}
}
if (a% 50 == 21) {
/ / random movement of tanks
for (int i = 4; i 0.5) {
if (Math.random ()> 0.5 )
opf = 1;
else
opf = 2;

} else {
if (Math.random ()> 0.5)
opf = 3;
else
opf = 4;

}
}
}
if (a% 50 == 31) {
/ / random movement of tanks
for (int i = 6; i 0.5) {
if (Math.random ()> 0.5 )
opf = 1;
else
opf = 2;

} else {
if (Math.random ()> 0.5)
opf = 3;
else
opf = 4;

}
}
}
if (a% 50 == 41) {
/ / random movement of tanks
for (int i = 8; i 0.5) {
if (Math.promiscuous ()> 0.5 )
opf = 1;
else
opf = 2;

} else {
if (Math.random ()> 0.5)
opf = 3;
else
opf = 4;

}
}
}
/ / redraw
if (shengming <= 0) {
/ / popup player1 victory dialog
JOptionPane.showMessageDialog (null,
. ERROR_MESSAGE);
/ / end of the game
System.exit (0);
}
this.repaint ();
}
}
}
  Reply With Quote
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 10:43 AM.

 

Powered by vBulletin Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Free Advertising Forums | Free Advertising Message Boards | Post Free Ads Forum