![返回新闻列表页](/skins/default/img/mub01Inpage/newsDetialsArticle_icon01.png)
罗昱焜演员在线视频-罗昱焜演员在线播放最新官网网址
标签:
在某自行车厂子做WIFI 拍了一张外景
锐捷-AP620一台主机4个60度天线
中兴811吸顶AP
超级AP MADEINTAIWAN
、
某5星酒店做WIFI时 外景一张游泳池
有些涉及到用户隐私,不方便发出来,请谅解
本帖子中包含更多资源
您需要登录才可以下载或查看,没有账号。不过还是有玩家想出了靠坐电车来刷千米数的方法,更有甚者将手机与无人机绑在了一起,不过就在最新一次的更新中,官方就封杀了这一“外*”行为,一起来看看吧。逼害危大眼仔子害人不浅呀。
TetrisClient类:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
importjava.awt.*;
importjava.awt.event.*;
publicclassTetrisClientextendsFrame{
//声明变量,窗口出现的位置
intx=300;
inty=100;
//游戏窗体宽高
publicstaticfinalintWIDTH=400;
publicstaticfinalintHEIGHT=480;
//修正值
publicstaticfinalintCORRECT_X=110;
publicstaticfinalintCORRECT_Y=50;
//游戏区域大小
publicstaticfinalintGAME_WIDTH=200;
publicstaticfinalintGAME_HEIGHTH=400;
Shapes=newShape(CORRECT_X+60,CORRECT_Y+60,3);
publicvoidlancher(){
//出现位置
this.setLocation(x,y);
//大小
this.setSize(WIDTH,HEIGHT);
//设置标题
this.setTitle("TetrisGame");
//不可调节大小
this.setResizable(false);
//布局属性
this.setLayout(null);
//设置游戏背景颜色
this.setBackground(newColor(255,239,213));
//添加窗口关闭事件
this.addWindowListener(newWindowAdapter(){
publicvoidwindowClosing(WindowEvente){
System.exit(0);
}
});
//启动一个刷新线程
newThread(newpaintThread()).start();
//可见性
this.setVisible(true);
//添加按键监控
this.addKeyListener(newkeyMonitor());
}
publicvoidpaint(Graphicsg){
Colorc=g.getColor();
g.drawRect(CORRECT_X,CORRECT_Y,GAME_WIDTH,GAME_HEIGHTH);
g.setColor(c);
//关于Shape的测试
s.draw(g);
s.changeStatus();
if(!s.stopped){
s.drop();
}
}
publicstaticvoidmain(String[]args){
newTetrisClient().lancher();
}
//刷新类(内部类)线程
publicclasspaintThreadimplementsRunnable{
publicvoidrun(){
while(true){
repaint();
//刷新间隔
try{
//“下”键按下加速
if(!s.speedUp){
Thread.sleep(300);
}
Thread.sleep(20);
}catch(InterruptedExceptione){
e.getStackTrace();
}
}
}
}
//按键事件的内部类
privateclasskeyMonitorextendsKeyAdapter{
publicvoidkeyPressed(KeyEvente){
s.keyPressed(e);
}
publicvoidkeyReleased(KeyEvente){
s.keyReleased(e);
}
}
}
Unit类:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
importjava.awt.BasicStroke;
importjava.awt.Color;
importjava.awt.Graphics;
importjava.awt.Graphics2D;
publicclassUnit{
//出现的位置
privateintx,y;
//大小
publicstaticfinalintSIZE=20;
//下落步长
publicstaticfinalintSPEED=20;
//停止状态
publicbooleanstopped=false;
//Shape颜色
privateColorcolor=Color.BLACK;
//构造函数
publicUnit(){
}
publicUnit(intx,inty){
this.x=x;
this.y=y;
}
publicUnit(intx,inty,Colorcolor){
this(x,y);
this.color=color;
}
//画出自己的方法
publicvoiddraw(Graphicsg){
//Colorc=g.getColor();
//g.setColor(Color.BLUE);
Graphics2Dg2=(Graphics2D)g;
g2.setStroke(newBasicStroke(3.0f));
g.drawRect(x,y,SIZE5,SIZE5);
g.fillRect(x+2,y+2,SIZE10,SIZE10);
}
publicvoiddrop(){
y+=SPEED;
}
//检测当前状态
publicvoidchangeStatus(){
if(y+SIZE>=TetrisClient.CORRECT_Y+TetrisClient.GAME_HEIGHTH){
stopped=true;
}
}
publicintgetX(){
returnx;
}
publicvoidsetX(intx){
this.x=x;
}
publicintgetY(){
returny;
}
publicvoidsetY(inty){
this.y=y;
}
publicvoidmoveLeft(){
x=SIZE;
}
publicvoidmoveRight(){
x+=SIZE;
}
publicbooleanhitLeft(){
if(x<=TetrisClient.CORRECT_X)
returntrue;
returnfalse;
}
publicbooleanhitRight(){
if(x>=TetrisClient.CORRECT_X+TetrisClient.GAME_WIDTHUnit.SIZE)
returntrue;
returnfalse;
}
}
Shape类:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
importjava.awt.Color;
importjava.awt.Graphics;
importjava.awt.event.KeyEvent;
importjava.util.ArrayList;
importjava.util.List;
importjava.util.Random;
publicclassShape{
intx,y;
//类型
inttype;
//是否按下“下”
booleanspeedUp=false;
//是否停止
publicbooleanstopped=false;
//图像颜色
privateColorcolor=null;
//颜色数组
publicstaticColor[]ColorArr={
//newColor(255,250,205),
newColor(230,230,250),
newColor(238,210,238),
newColor(106,90,205),
newColor(192,255,62),
newColor(162,205,90),
newColor(255,246,143),
newColor(255,165,0)
};
//随机类对象
Randomr=newRandom();
intcolorIndex=r.nextInt(ColorArr.length);
//类型的图
int[][][]data={
{//0.一字型
{0,0,0,0},
{0,0,0,0},
{2,2,2,2},
{0,0,0,0}
},
{//1.田字型
{0,0,0,0},
{0,2,2,0},
{0,2,2,0},
{0,0,0,0}
},
{//2.L字型
{0,0,0,0},
{0,2,0,0},
{0,2,0,0},
{0,2,2,0}
},
{//3.反L字型
{0,0,0,0},
{0,2,0,0},
{0,2,0,0},
{2,2,0,0}
},
{//4.Z字型
{0,0,0,0},
{2,2,0,0},
{0,2,2,0},
{0,0,0,0}
},
{//5.反Z字型
{0,0,0,0},
{0,0,2,2},
{0,2,2,0},
{0,0,0,0}
},
{//6.品字型
{0,0,0,0},
{0,2,0,0},
{2,2,2,0},
{0,0,0,0}
},
};
//能够装Unit的容器
List<unit>units=newArrayList<unit>();
//构造方法
publicShape(intx,inty,inttype){
this.x=x;
this.y=y;
this.type=type;
//使用随机颜色
this.color=ColorArr[colorIndex];
//实例化4个unit对象
for(inti=0;i<4;++i){
units.add(newUnit());
}
createByType();
}
privatevoidcreateByType(){
intcount=0;
for(inti=0;i<data[type].length;++i){
for(intj=0;j<data[type][i].length;++j){
if(data[type][i][j]==2){
units.get(count).setX(x+j*Unit.SIZE);
units.get(count).setY(y+i*Unit.SIZE);
count++;
}
}
}
}
//画图
publicvoiddraw(Graphicsg){
g.setColor(color);
for(inti=0;i<units.size();++i){
units.get(i).draw(g);
}
}
//下落方法
publicvoiddrop(){
y+=Unit.SPEED;
for(inti=0;i<units.size();++i){
units.get(i).drop();
}
}
//检测是否停止
publicvoidchangeStatus(){
//如果判断每一个unit,有任意一个停止,则修改停止状态
for(inti=0;i<units.size();++i){
Unitu=units.get(i);
u.changeStatus();
if(u.stopped){
stopped=true;
return;
}
}
}
//按键事件
publicvoidkeyPressed(KeyEvente){
intkey=e.getKeyCode();
switch(key){
caseKeyEvent.VK_LEFT:
if(!hitLeft())
moveLeft();
break;
caseKeyEvent.VK_RIGHT:
if(!hitRight())
moveRight();
break;
caseKeyEvent.VK_DOWN:
speedUp=true;
}
}
privatevoidmoveRight(){
x=Unit.SIZE;
for(inti=0;i<units.size();++i){
units.get(i).moveRight();
}
}
privatevoidmoveLeft(){
x+=Unit.SIZE;
for(inti=0;i<units.size();++i){
units.get(i).moveLeft();
}
}
//判断是否触碰左侧
publicbooleanhitLeft(){
booleanb=false;
for(inti=0;i<units.size();++i){
if(units.get(i).hitLeft()){
b=true;
break;
}
}
returnb;
}
//判断是否触碰右侧
publicbooleanhitRight(){
booleanb=false;
for(inti=0;i<units.size();++i){
if(units.get(i).hitRight()){
b=true;
break;
}
}
returnb;
}
publicvoidkeyReleased(KeyEvente){
if(e.getKeyCode()==KeyEvent.VK_DOWN){
speedUp=false;
}
}
}
</unit></unit>。
学习借鉴国外先进的东西,回来为我所用,十个九个发财,你不得不信,不是盲目崇拜,而是吸取人家精华,走出去……一个充满科技之光粒子的社会能洗涤人的灵魂,让人脱胎换骨,最大释放人的潜能,载人史册的科学泰斗无不来自于国外的教育。