當前位置:首頁 » 操作系統 » 12堂的源碼

12堂的源碼

發布時間: 2023-09-12 15:26:48

Ⅰ 急求C語言編譯的小游戲(如掃雷),附帶源代碼和注釋。

小游戲2048:

#include<stdio.h>

#include<stdlib.h>

#include<conio.h>

#include<time.h>

#include<windows.h>

int jsk( ); //計算空格數

void rsgm( ); //重置游戲

void inkey( ); //按鍵輸入

void left( ); //向左移動

void right( ); //向右移動

void up( ); //向上移動

void down( ); //向下移動

void show( ); //輸出界面

void adnum( ); //添加隨機數

void yes( ); //游戲是否結束(1是0否)

void gtxy(int x, int y); //控制游標位置的函數

int a[4][4]; //存儲16個格子中的數字

int score = 0; //每局得分

int best = 0; //最高得分

int ifnum; //是否需要添加數字(1是0否)

int over; //游戲結束標志(1是0否)

int i,j,k;

int main( )

{ rsgm( ); //重置游戲

inkey( ); //按鍵輸入

return 0;

}

void setColor(unsigned short ForeColor = 7, unsigned short BackGroundColor = 0)

{ HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(handle, ForeColor + BackGroundColor * 0x10);

} //用於控制字元顏色的函數

void rsgm( ) //重置游戲

{ score = 0; ifnum = 1; over = 0; srand((unsigned)time(0)); //啟動隨機數發生器

int n = rand( ) % 16; //隨機函數產生0-15的數字

for (i = 0; i < 4; i++)

{for (j = 0; j < 4; j++)

{ if (n == 0) { int k = rand( ) % 3; if (k == 0 || k == 1) { a[i][j] = 2; }

else { a[i][j] = 4; } n--; }

else { a[i][j] = 0; n--; }

}

}

adnum( );

system("cls");

CONSOLE_CURSOR_INFO cursor_info={1,0}; //以下兩行是隱藏游標的設置

SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);

setColor(14, 0); //設置字體淡黃色,背景為黑色

printf(" 2048小游戲"); setColor(7, 0); //恢復白字黑底

printf(" ┌──────┬──────┬──────┬──────┐");

printf(" │ │ │ │ │");

printf(" ├──────┼──────┼──────┼──────┤");

printf(" │ │ │ │ │");

printf(" ├──────┼──────┼──────┼──────┤");

printf(" │ │ │ │ │");

printf(" ├──────┼──────┼──────┼──────┤");

printf(" │ │ │ │ │");

printf(" └──────┴──────┴──────┴──────┘");

show( );

}

void show( ) //輸出界面

{ for(i=0;i<4;i++)

for(j=0;j<4;j++)

{ gtxy(7*j+9,2*i+4); //gtxy(7*j+9, 2*i+4)是游標到指定位置輸出數字

if(a[i][j]==0){printf(" "); setColor(7, 0); printf("│");}

else if(a[i][j]<10){ if (a[i][j] == 2) {setColor(14, 0); }

else if (a[i][j] == 4) {setColor(13, 0); }

else if (a[i][j] == 8) {setColor(12, 0); }

printf(" %d ", a[i][j]); setColor(7, 0); printf("│");

}

else if (a[i][j] < 100){if (a[i][j] == 16) {setColor(12, 0); }

else if (a[i][j] == 32) {setColor(10, 0); }

else if (a[i][j] == 64) {setColor(2, 0); }

printf(" %d ", a[i][j]); setColor(7, 0); printf("│");

}

else if (a[i][j] < 1000) {if (a[i][j] == 128) {setColor(9, 0); }

else if (a[i][j] == 256) {setColor(1, 0); }

else if (a[i][j] == 512) {setColor(13, 0); }

printf(" %d ", a[i][j]); setColor(7, 0); printf("│");

}

else if (a[i][j] < 10000) {if (a[i][j] == 1024) {setColor(5, 0); }

else {setColor(15, 0); }

printf(" %d ", a[i][j]); setColor(7, 0); printf("│");

}

}

if (jsk( ) == 0)

{ yes( ); if (over) { gtxy(9,12); setColor(10, 0);

printf(" 游戲結束!是否繼續? [ Y/N ]:"); }

}

}

void inkey( ) //按鍵輸入

{ int key;

while (1)

{ key = getch( );

if (over) { if (key == 89|| key == 121) {rsgm( ); continue; }

else if (key == 78|| key == 110) { return; }

else continue; }

ifnum = 0;

if(key==224)key=getch( );

switch (key)

{ case 75: left( ); break;

case 77: right( ); break;

case 72: up( ); break;

case 80: down( );break;

}

if (score > best) { best = score; }

if (ifnum) { adnum( ); show( ); }

}

}

int jsk( ) //計算空格數

{ int n = 0;

for (i = 0; i < 4; i++)

{ for (j = 0; j < 4; j++) { if ( a[i][j] == 0) {n++;} } }

return n;

}

void left( ) //向左移動

{ for (i = 0; i < 4; i++)

{for (j = 1, k = 0; j < 4; j++)

{ if (a[i][j] > 0)

{ if ( a[i][k] == a[i][j])

{ a[i][k] *= 2; k++;

score = score + 2 * a[i][j];

a[i][j] = 0; ifnum = 1; }

else if ( a[i][k] == 0) { a[i][k] = a[i][j]; a[i][j] = 0; ifnum = 1; }

else { a[i][k + 1] = a[i][j]; if ((k + 1) != j) { a[i][j] = 0; ifnum = 1; }

k++; }

}

}

}

}

void right( ) //向右移動

{for (i = 0; i < 4; i++)

{for (j = 2, k = 3; j >= 0; j--)

{if (a[i][j] > 0)

{ if (a[i][k] == a[i][j])

{a[i][k] *= 2; k--; score = score + 2 * a[i][j]; a[i][j] = 0; ifnum = 1; }

else if ( a[i][k] == 0) {a[i][k] = a[i][j]; a[i][j] = 0; ifnum = 1; }

else { a[i][k - 1] = a[i][j]; if ((k - 1) != j) { a[i][j] = 0; ifnum = 1; } k--; }

}

}

}

}

void up( ) //向上移動

{for (i = 0; i < 4; i++)

{for (j = 1, k = 0; j < 4; j++)

{if (a[j][i] > 0)

{if ( a[k][i] == a[j][i]) { a[k][i] *= 2; k++;score = score + 2 * a[j][i];

a[j][i] = 0; ifnum = 1; }

else if ( a[k][i] == 0) { a[k][i] = a[j][i]; a[j][i] = 0; ifnum = 1; }

else { a[k + 1][i] = a[j][i]; if ((k + 1) != j) { a[j][i] = 0; ifnum = 1; }

k++; }

}

}

}

}

void down( ) //向下移動

{ for (i = 0; i < 4; i++)

{for (j = 2, k = 3; j >= 0; j--)

{if (a[j][i] > 0)

{if (a[k][i] == a[j][i])

{a[k][i] *= 2; k--;score = score + 2 * a[j][i]; a[j][i] = 0; ifnum = 1; }

else if (a[k][i] == 0) {a[k][i] = a[j][i]; a[j][i] = 0; ifnum = 1; }

else {a[k - 1][i] = a[j][i];

if ((k - 1) != j) {a[j][i] = 0; ifnum = 1; } k--; }

}

}

}

}

void adnum( ) //添加隨機數

{ srand(time(0)); int n = rand( ) % jsk( );

for (int i = 0; i < 4; i++)

{for (int j = 0; j < 4; j++)

{ if (a[i][j] == 0) {if (n != 0) { n--; }

else {int k = rand() % 3;

if (k == 0 || k == 1) {a[i][j] = 2; return; }

else {a[i][j] = 4; return; } }

}

}

}

}

void yes( ) //游戲是否結束

{ for (int i = 0; i < 4; i++)

{for (int j = 0; j < 3; j++)

{if (a[i][j] == a[i][j + 1] || a[j][i] == a[j + 1][i]) {over = 0; return; }}

}

over = 1;

}

void gtxy(int x, int y) //控制游標位置的函數

{ COORD coord;

coord.X = x;

coord.Y = y;

SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);

}

Ⅱ 怎樣看這個網頁的全部源代碼

哈哈``

我幫你找到了``

http://www.iieye.com/comic/viewcomic_chk.htm?InfoID=13037&ID=121476&VolTitle=Vol_01

這是ID,你只要對應改網址最後面那個與之對應的就行了

就是這個 =Vol_01 把它改成 02 03 04 …………

Ⅲ 源代碼哪個平台可以看

你好,一下可以試一試:1.51源碼: http://www.51aspx.com/



2.源碼之家: http://www.codejia.com/



3.源碼網:森團 http://www.codepub.com/



4.蝦客蠢茄源碼: http://www.xkxz.com/



5.多多源碼: http://www.morecode.net/



6.洪越源代碼: http://www.softhy.net/



7.鋒網源碼:http://www.fwvv.net/



8.代碼愛好者:http://www.codefans.com/



9.愛源碼:http://www.aiyuanma.com/



10.酷源碼:http://www.kyuanma.com/



11.搜源碼:http://www.soucode.com/



12.拉基源碼:http://www.lajicode.com/



13.源碼開發網:http://www.codedn.com/



14.源碼天空:http://www.codesky.net/



15.源碼吧:http://www.asp88.net/



16.綠色源碼:http://code888.cn/



17.9號源碼中此檔橘心:http://www.9code.com/

Ⅳ 如何查看加密了的網頁的源代碼啊

<!--STATUS OK--><html><head>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<title>網路搜索_site:(sina.com) 鄭智化 </title>
<STYLE>
<!--
body,td,.p1,.p2,.i{font-family:arial}
TD{FONT-SIZE:9pt;LINE-HEIGHT:18px;}
.f14{FONT-SIZE:14px}
.f10{font-size:10.5pt}
.f16{font-size:16px;font-family:Arial}
.c{color:#7777CC;}
.p1{LINE-HEIGHT:120%;margin-left:-12pt}
.p2{width=100%;LINE-HEIGHT:120%;margin-left:-12pt}
.i{font-size:16px}
.t{COLOR:#0000cc;TEXT-DECORATION:none}
a.t:hover{TEXT-DECORATION:underline}
.p{padding-left:18px;font-size:14px;word-spacing:4px;}
.f{line-height:120%;font-size:100%;width:32em;padding-left:15px;word-break:break-all;word-wrap:break-word;}
.h{margin-left:8px;width:100%}
.s{width:8%;padding-left:10px; height:25px;}
.m,a.m:link{COLOR:#666666;font-size:100%;}
a.m:visited{COLOR:#660066;}
.g{color:#008000; font-size:12px;}
.r{ word-break:break-all;cursor:hand;width:225px;}
.bi {background-color:#D9E1F7;height:20px;margin-bottom:12px}
.pl{padding-left:3px;height:8px;padding-right:2px;font-size:14px;}
.Tit{height:21px; font-size:14px;}
.fB{ font-weight:bold;}
.mo,a.mo:link,a.mo:visited{COLOR:#666666;font-size:100%;line-height:10px;}
.htb{margin-bottom:5px;}
-->
</STYLE>
<script language="javascript">
<!--
function my_submit(form){
form.sr.value=1;
form.action='/s?tn=aiyat&ct=0&ie=gb2312&cl=3&f=8&bs=site:(sina.com) 鄭智化&wd=site:(sina.com) 鄭智化&sr=1';
form.submit();
return true;
}
function my_submit1(form){
form.ct.value=0;
form.sr.value=0;
form.action='/s?tn=aiyat&ct=0&ie=gb2312&cl=3&f=8&bs=site:(sina.com) 鄭智化&wd=site:(sina.com) 鄭智化&sr=0';
form.submit();
return true;
}
function h(obj,url){
obj.style.behavior='url(#default#homepage)';
obj.setHomePage(url);
}
if (top.location != self.location) {
top.location=self.location;
}
if (window.name == 'nw') { window.name = '';}
function ga(o,e){if (document.getElementById){a=o.id.substring(1); p = "";r = "";g = e.target;if (g)
{ t = g.id;f = g.parentNode;if (f) {p = f.id;h = f.parentNode;if (h) r = h.id;}} else{h = e.srcElement;f = h.parentNode;if (f) p = f.id;t = h.id;}if (t==a || p==a || r==a) return true;window.open(document.getElementById(a).href,'_blank')}}
function ss(w){window.status=w;return true;}
function cs(){window.status='';}
function c(w,u,s,p,t){if(document.images){var p=window.document.location.href;var t=(new Date()).getTime();(new Image()).src="http://survey2..com/images/w.gif?query="+w+"&url="+escape(u)+"&spos="+s+"&path="+p+"&t="+t;}return true;}
//-->
</script></head>
<body onload="document.f1.reset();" bgcolor=#ffffff text=#000000 link=#261CDC topmargin=6 bottommargin=0 leftmargin=0 rightmargin=0>
<table width="100%" height="54" border="0" align="center" cellpadding="0" cellspacing="0">
<form name=f1 action="/s">
<tr valign=middle>
<td width="100%" valign="top" style="padding-left:8px;width:137px;" nowrap>
<a href="http://www..com/"><img src="http://www..com/img/sslm1_logo.gif" border="0" width="137" height="60" alt="到網路首頁"></a>
</td>
<td></td>
<td width="100%" valign="top">
<div class="Tit">
<a href="http://news..com/ns?cl=2&rn=20&tn=news&word=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF">新聞</a><span class="fB">網頁</span><a href="http://post..com/f?kw=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF">貼吧</a><a href="http://..com/q?ct=17&pn=0&tn=ikaslist&rn=10&word=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&fr=wwwt">知道</a><a href="http://mp3..com/m?tn=mp3&ct=134217728&lm=-1&word=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF">MP3</a><a href="http://image..com/i?tn=image&ct=201326592&lm=-1&cl=2&word=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF">圖片</a><!--bds<a href="$bdDSURL$">硬碟</a> -->
</div>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td valign="top" nowrap>
<input type=hidden name=tn value="aiyat">
<input type=hidden name=ie value="gb2312">
<input type=hidden name=bs value="site:(sina.com) 鄭智化">
<input type=hidden name=sr>
<input type=hidden name=z value="">
<input type=hidden name=cl value=3>
<input type=hidden name=f value=8>
<input name=wd size="35" class="i" value="site:(sina.com) 鄭智化" maxlength=100>
<input type=hidden name=ct value="0"><input type=submit value=網路搜索> <input type=button value=在結果中找 onclick="return my_submit(f1);"></td>
<td valign="middle" nowrap>
<a href=http://www..com/search/jiqiao.html target="_blank">幫助</a>|<a href="http://www..com/gaoji/advanced.html">高級搜索</a>
</td></tr></table>
</td>
<td></td>
</tr></form></table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="bi">
<tr>
<td nowrap><a onClick="h(this,'http://www..com')" href="#" style="color:#000000 ">把網路設為首頁</a></td>
<td align="right" nowrap>網路一下,找到相關網頁約2,860篇,用時0.001秒</td>
</tr>
</table>
<table width="25%" border="0" cellpadding="0" cellspacing="0" align="right"><tr>
<td align="left" style="padding-right:10px">
<div style="border-left:1px solid #e1e1e1;padding-left:10px;word-break:break-all;word-wrap:break-word;">
</div>
<br>
<DIV id=ScriptDiv></DIV>
</td></tr></table>
<table border="0" cellpadding="0" cellspacing="0"><tr><td class=f><a onmousedown="return c('site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF',this.href,1)" href="http://books.sina.com/creation/sinacolumn/contents/20050310/20050310-016_1_gb.html" target="_blank"><font size="3">解讀<font color=#C60A00>鄭智化</font></font></a><br><font size=-1><font color=#C60A00>鄭智化</font>在一般人的印象中,大概會是一副身殘志堅的形象,至少在大陸是如此。這可以從他在大陸的軌跡得到證明:他在大陸...事實上,<font color=#C60A00>鄭智化</font>的意義決不局限於以一位殘疾人的身份唱出勵志歌曲。 <font color=#C60A00>鄭智化</font>最早的一首... <br><font color=#008000>books.sina.com/creation/sinacolumn/conten ... 13K 2005-3-10 </font> - <a href="http://cache..com/c?word=%D6%A3%3B%D6%C7%BB%AF&url=http%3A//books%2Esina%2Ecom/creation/sinacolumn/contents/20050310/20050310%2D016%5F1%5Fgb%2Ehtml&b=0&a=13&user=" target="_blank" class=m>網路快照</a> <br></font></td></tr></table><br><table border="0" cellpadding="0" cellspacing="0"><tr><td class=f><a onmousedown="return c('site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF',this.href,2)" href="http://books.sina.com/creation/sinacolumn/contents/20050310/20050310-016_8_gb.html" target="_blank"><font size="3">解讀<font color=#C60A00>鄭智化</font></font></a><br><font size=-1>現在我們可以明顯的感覺到<font color=#C60A00>鄭智化</font>是站在現代社會懷念前現代 「腳(印)」這個比喻至少在他的歌里出現...這樣我們也就能夠理解<font color=#C60A00>鄭智化</font>如此熱情的謳歌《南台灣》,在這里,一定是踩得出腳印的: 熱情的陽光探出了頭/... <br><font color=#008000>books.sina.com/creation/sinacolumn/conten ... 13K 2005-3-10 </font> - <a href="http://cache..com/c?word=%D6%A3%3B%D6%C7%BB%AF&url=http%3A//books%2Esina%2Ecom/creation/sinacolumn/contents/20050310/20050310%2D016%5F8%5Fgb%2Ehtml&b=0&a=86&user=" target="_blank" class=m>網路快照</a> <br></font></td></tr></table><br><table border="0" cellpadding="0" cellspacing="0"><tr><td class=f><a onmousedown="return c('site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF',this.href,3)" href="http://books.sina.com/creation/sinacolumn/contents/20050310/20050310-016_4_gb.html" target="_blank"><font size="3">解讀<font color=#C60A00>鄭智化</font></font></a><br><font size=-1>但是<font color=#C60A00>鄭智化</font>並不是在若干年後簡單的重復自己,而是在觀察之後,對城市生活進行了更細致的描寫,同時,其批判的立場亦...《水手》這首歌收錄在<font color=#C60A00>鄭智化</font>的專輯《私房歌》里,在引進時,《大國民》這首歌被剔除掉了,大概是因為政治的關系吧。... <br><font color=#008000>books.sina.com/creation/sinacolumn/conten ... 13K 2005-3-10 </font> - <a href="http://cache..com/c?word=%D6%A3%3B%D6%C7%BB%AF&url=http%3A//books%2Esina%2Ecom/creation/sinacolumn/contents/20050310/20050310%2D016%5F4%5Fgb%2Ehtml&b=0&a=94&user=" target="_blank" class=m>網路快照</a> <br></font></td></tr></table><br><table border="0" cellpadding="0" cellspacing="0"><tr><td class=f><a onmousedown="return c('site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF',this.href,4)" href="http://chinanews.sina.com/ent/2005/0815/2006705757.html" target="_blank"><font size="3"><font color=#C60A00>鄭智化</font>講述曲折人生:我現在是嘮叨的老爸(圖) ...</font></a><br><font size=-1>身殘志堅的台灣著名歌手<font color=#C60A00>鄭智化</font>,以《水手》和《星星點燈》等立志歌曲紅遍大江南北。淡出歌壇許久的他,已從歌壇鄭...<font color=#C60A00>鄭智化</font>一出生就是個健康寶寶,但在他三歲的時候,發高燒引發小兒麻痹,因為延誤治療,導致骨頭變形,雙腳完全不能行走... <br><font color=#008000>chinanews.sina.com/ent/2005/0815/20067057 ... 20K 2005-8-16 </font> - <a href="http://cache..com/c?word=%D6%A3%3B%D6%C7%BB%AF&url=http%3A//chinanews%2Esina%2Ecom/ent/2005/0815/2006705757%2Ehtml&b=0&a=15&user=" target="_blank" class=m>網路快照</a> <br></font></td></tr></table><br><table border="0" cellpadding="0" cellspacing="0"><tr><td class=f><a onmousedown="return c('site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF',this.href,5)" href="http://chinanews.sina.com/ent/2005/0510/1131526834.html" target="_blank"><font size="3"><font color=#C60A00>鄭智化</font>是爛男人好爸爸 女兒叫我稍息我不敢立正 ...</font></a><br><font size=-1>昨天下午,<font color=#C60A00>鄭智化</font>和內地的斗室文化公司簽約,台灣著名音樂人周治平、吳旭文等均到場祝賀,<font color=#C60A00>鄭智化</font>的歌迷、現任星文唱片副總的王磊還帶來自己珍藏多年的黑膠唱片送給他作為禮物。為答謝多年支持自己的朋友,<font color=#C60A00>鄭智化</font>現場清唱了剛剛寫好... <br><font color=#008000>chinanews.sina.com/ent/2005/0510/11315268 ... 23K 2005-5-11 </font> - <a href="http://cache..com/c?word=%D6%A3%3B%D6%C7%BB%AF&url=http%3A//chinanews%2Esina%2Ecom/ent/2005/0510/1131526834%2Ehtml&b=0&a=72&user=" target="_blank" class=m>網路快照</a> <br></font></td></tr></table><br><table border="0" cellpadding="0" cellspacing="0"><tr><td class=f><a onmousedown="return c('site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF',this.href,6)" href="http://chinanews.sina.com/ent/2004/1111/0102197607.html" target="_blank"><font size="3"><font color=#C60A00>鄭智化</font>:揭開一切的老底 - SINA.com - China ...</font></a><br><font size=-1><font color=#C60A00>鄭智化</font>這個名字,並不意味著「巨星」或者驚心動魄的巨響,然而卻代表了人文的意志、清醒的自我與透徹的真情。而...從事廣告業的殘疾青年<font color=#C60A00>鄭智化</font>,憑借一次吃飯時的靈感乍現,寫出了第一首歌曲《給開心女孩》。當這首歌隨著廣告紅遍... <br><font color=#008000>chinanews.sina.com/ent/2004/1111/01021976 ... 18K 2004-11-11 </font> - <a href="http://cache..com/c?word=%D6%A3%3B%D6%C7%BB%AF&url=http%3A//chinanews%2Esina%2Ecom/ent/2004/1111/0102197607%2Ehtml&b=0&a=85&user=" target="_blank" class=m>網路快照</a> <br></font></td></tr></table><br><table border="0" cellpadding="0" cellspacing="0"><tr><td class=f><a onmousedown="return c('site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF',this.href,7)" href="http://books.sina.com/creation/sinacolumn/contents/20050310/20050310-016_7_gb.html" target="_blank"><font size="3">解讀<font color=#C60A00>鄭智化</font></font></a><br><font size=-1>中產階級的出現,無疑是現代社會的產物,聯繫到前面分析過的<font color=#C60A00>鄭智化</font>的立場,我們不難發現這首歌正是其一貫立場的表現。 ,<font color=#C60A00>鄭智化</font>的一首《蝸牛的家》也很有代表性,非常值得一談: 密密麻麻的高樓大廈,找... <br><font color=#008000>books.sina.com/creation/sinacolumn/conten ... 12K 2005-3-10 </font> - <a href="http://cache..com/c?word=%D6%A3%3B%D6%C7%BB%AF&url=http%3A//books%2Esina%2Ecom/creation/sinacolumn/contents/20050310/20050310%2D016%5F7%5Fgb%2Ehtml&b=0&a=69&user=" target="_blank" class=m>網路快照</a> <br></font></td></tr></table><br><table border="0" cellpadding="0" cellspacing="0"><tr><td class=f><a onmousedown="return c('site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF',this.href,8)" href="http://books.sina.com/creation/sinacolumn/contents/20050310/20050310-016_6_gb.html" target="_blank"><font size="3">解讀<font color=#C60A00>鄭智化</font></font></a><br><font size=-1>正是因為<font color=#C60A00>鄭智化</font>的憂傷是內在的,所以他的這類歌曲雖然沒有明顯的批判現實的立場,但也頗能以情動人。在<font color=#C60A00>鄭智化</font>的歌...正是因為這種理想主義者的姿態,使得<font color=#C60A00>鄭智化</font>不斷的直面現實生活中的「怪現狀」。在《中產階級》里,<font color=#C60A00>鄭智化</font>描寫了一... <br><font color=#008000>books.sina.com/creation/sinacolumn/conten ... 12K 2005-3-10 </font> - <a href="http://cache..com/c?word=%D6%A3%3B%D6%C7%BB%AF&url=http%3A//books%2Esina%2Ecom/creation/sinacolumn/contents/20050310/20050310%2D016%5F6%5Fgb%2Ehtml&b=0&a=157&user=" target="_blank" class=m>網路快照</a> <br></font></td></tr></table><br><table border="0" cellpadding="0" cellspacing="0"><tr><td class=f><a onmousedown="return c('site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF',this.href,9)" href="http://books.sina.com/creation/sinacolumn/contents/20050310/20050310-016_9_gb.html" target="_blank"><font size="3">解讀<font color=#C60A00>鄭智化</font></font></a><br><font size=-1>陽光是熱情的,大地是綠油油的,有椰林,有藍天白雲,所以<font color=#C60A00>鄭智化</font>說:美麗的南台灣呀,我捨不得離開。...就我個人的感受而言,我認為這首歌是<font color=#C60A00>鄭智化</font>比較獨特的一首作品。在這首歌里,我們看不到<font color=#C60A00>鄭智化</font>的批判立場,也看不到... <br><font color=#008000>books.sina.com/creation/sinacolumn/conten ... 12K 2005-3-10 </font> - <a href="http://cache..com/c?word=%D6%A3%3B%D6%C7%BB%AF&url=http%3A//books%2Esina%2Ecom/creation/sinacolumn/contents/20050310/20050310%2D016%5F9%5Fgb%2Ehtml&b=0&a=167&user=" target="_blank" class=m>網路快照</a> <br></font></td></tr></table><br><table border="0" cellpadding="0" cellspacing="0"><tr><td class=f><a onmousedown="return c('site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF',this.href,10)" href="http://chinanews.sina.com/ent/2005/1218/2110939273.html" target="_blank"><font size="3">昨日「鄭式影響」座無虛席 <font color=#C60A00>鄭智化</font>淚灑北展劇場 -...</font></a><br><font size=-1>還是1993年那身銀灰色的上衣,當<font color=#C60A00>鄭智化</font>一改初上舞台時質朴的一面開始帶領大家一起懷舊的時候,北展劇場頓時沸騰了...也許是這個讓人感動的開場迅速讓<font color=#C60A00>鄭智化</font>找回了舞台之王的感覺,當演唱會進行到<font color=#C60A00>鄭智化</font>向來自台灣、新加坡、馬來西亞... <br><font color=#008000>chinanews.sina.com/ent/2005/1218/21109392 ... 21K 2005-12-19 </font> - <a href="http://cache..com/c?word=%D6%A3%3B%D6%C7%BB%AF&url=http%3A//chinanews%2Esina%2Ecom/ent/2005/1218/2110939273%2Ehtml&b=0&a=104&user=" target="_blank" class=m>網路快照</a> <br></font></td></tr></table><br>
<br clear=all>
<div class="p">1 <a href=s?lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&wd=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&pn=10&cl=3>[2]</a><a href=s?lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&wd=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&pn=20&cl=3>[3]</a><a href=s?lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&wd=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&pn=30&cl=3>[4]</a><a href=s?lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&wd=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&pn=40&cl=3>[5]</a><a href=s?lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&wd=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&pn=50&cl=3>[6]</a><a href=s?lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&wd=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&pn=60&cl=3>[7]</a><a href=s?lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&wd=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&pn=70&cl=3>[8]</a><a href=s?lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&wd=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&pn=80&cl=3>[9]</a><a href=s?lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&wd=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&pn=90&cl=3>[10]</a><a href=s?lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&wd=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&pn=10&cl=3><font size=3>下一頁</font></a></div><br>
<div style="background-color:#EFF2FA;height:60px;width:100%;clear:both">
<table width="96%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td style="font-size:14px;font-weight:bold;height:40px;width:70px;">相關搜索</td>
<td rowspan="2" valign="middle">
<table border="0" cellpadding="0" cellspacing="0"><tr>
<td nowrap class="f14"><a href="s?wd=%D6%A3%D6%C7%BB%AF%D7%A8%BC%AD&lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&cl=3&f=1&rsp=0">鄭智化專輯</a></td>
<td nowrap class="s"></td>
<td nowrap class="f14"><a href="s?wd=%D6%A3%D6%C7%BB%AF%B8%E8%C7%FA&lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&cl=3&f=1&rsp=1">鄭智化歌曲</a></td>
<td nowrap class="s"></td>
<td nowrap class="f14"><a href="s?wd=%CB%AE%CA%D6+%D6%A3%D6%C7%BB%AF&lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&cl=3&f=1&rsp=2">水手 鄭智化</a></td>
<td nowrap class="s"></td>
<td nowrap class="f14"><a href="s?wd=%D6%A3%D6%C7%BB%AF%D7%A8%BC%AF&lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&cl=3&f=1&rsp=3">鄭智化專集</a></td>
<td nowrap class="s"></td>
<td nowrap class="f14"><a href="s?wd=%D6%A3%D6%C7%BB%AF%D0%C2%B8%E8&lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&cl=3&f=1&rsp=4">鄭智化新歌</a></td>
</tr><tr>
<td nowrap class="f14"><a href="s?wd=%D6%A3%D6%C7%BB%AF%B5%C4%B8%E8&lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&cl=3&f=1&rsp=5">鄭智化的歌</a></td>
<td nowrap class="s"></td>
<td nowrap class="f14"><a href="s?wd=%D6%A3%D6%C7%BB%AF%D1%DD%B3%AA%BB%E1&lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&cl=3&f=1&rsp=6">鄭智化演唱會</a></td>
<td nowrap class="s"></td>
<td nowrap class="f14"><a href="s?wd=%D6%A3%D6%C7%BB%AF%B5%C4%B8%E8%C7%FA&lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&cl=3&f=1&rsp=7">鄭智化的歌曲</a></td>
<td nowrap class="s"></td>
<td nowrap class="f14"><a href="s?wd=%D6%A3%D6%C7%BB%AFmtv&lm=0&si=&rn=10&tn=aiyat&ie=gb2312&ct=0&cl=3&f=1&rsp=8">鄭智化mtv</a></td>
<td nowrap class="s"></td>
<td nowrap class="f14">
<a href="http://d..com/rs.php?q=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF&tn=aiyat">更多相關搜索>></a>
</td></tr></table>
</td></tr>
<tr><td></td></tr></table>
</div><br>
<table border="0" cellpadding="0" cellspacing="0" style="margin-left:18px;height:60px;">
<form name=f2 action="/s">
<tr valign="middle">
<td nowrap>
<input type=hidden name=tn value="aiyat">
<input type=hidden name=ct value="0">
<input type=hidden name=ie value="gb2312">
<input type=hidden name=bs value="site:(sina.com) 鄭智化">
<input type=hidden name=sr>
<input type=hidden name=z value="">
<input type=hidden name=cl value=3>
<input type=hidden name=f value=8>
<input name=wd size="35" class=i value="site:(sina.com) 鄭智化" maxlength=100>
<input type=submit value=網路搜索> <input type=button value=在結果中找 onclick="return my_submit(f2);"></td>
<td nowrap><a href="http://utility..com/quality/quality_form.php?word=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF">與網路對話</a></td>
</tr>
</form>
</table>
<div style="text-align:center;background-color:#e6e6e6;height:20px;padding-top:2px;font-size:12px;">
<a href="http://www..com/ty/right.html" class="c">&;2006</a> Bai <a href="http://www..com/ty/index.html" class="c">免責聲明</a> <font color=#666666>此內容系網路根據您的指令自動搜索的結果,不代表網路贊成被搜索網站的內容或立場</font>
</div>
<img src="http://c..com/c.gif?t=0&q=site%3A%28sina%2Ecom%29+%D6%A3%D6%C7%BB%AF" style="display:none;"/>
<script>
var p=window.document.location.href;var t=(new Date()).getTime();document.write ("<img src=http://survey2..com/images/w.gif?path="+p+"&t="+t+" border=0 width=0 height=0>");
</script>
</body></html>

Ⅳ 《古惑仔》里「洪興」十二堂堂主都有誰

《古惑仔》里「洪興」十二堂堂主如下所示:

1、蔣天生,洪興龍頭老大,在荷蘭被殺,後由其親弟蔣天養泰國回來接管洪興。

2、靚坤,銅鑼灣扛霸仔,被灣仔槍神爆頭,後來是陳浩南老大。

3、大佬B,慈雲山老大,後被靚坤害死全家,靚坤一手接管,因為當時通過選票靚坤當選龍頭老大。

4、韓賓-,葵青,油尖、旺角。

5、十三妹,波瀾街一帶。

6、恐龍,屯門清一色全罩,韓賓親弟,後被東星耀揚害死,經山雞打敗生番,奪得屯門。

7、黎胖子,北角「出版界的有文化?」,吃裡爬外被逐出洪興,由大飛勝任。

8、太子洪飛,打拳出名,尖沙咀老大。

9、陳耀,耀哥,洪興主持大局,助理。

10、基哥,牆頭草,不知道扛什麼地方,西環。

11、興叔,輩份最老,第一部龍頭大會時坐一辦事人位置,開過玩笑提起過他,山雞擺宴席請客時就他到來。

12、阿超,其中有一部在按摩時被殺,當時基哥跳樓受傷逃走,好像是被三聯幫丁瑤派人暗殺。

(5)12堂的源碼擴展閱讀:

《古惑仔》簡介:

這部電影改編自牛佬同名漫畫,正傳電影由劉偉強執導,鄭伊健、陳小春等為主演。

《古惑仔》改編自三日刊精修同名彩漫的經典故事,講述了洪興成員陳浩南、山雞、大天二等人出生入死的故事,涉及兄弟情義、友情歲月、刻骨愛情,詮釋了一代人無處安放的青春。

Ⅵ 求www.12kan.cn電影網站源代碼

現在用的免費比較多的是亞陽影視,免費使用的
下載地址:http://www.ayang.cn/ayangmoviecms2007.rar

亞陽影視網站演示地址:http://www.ayang.cn
你可以去看看外觀如何?不錯吧!

電影網站用的的資料庫Access版的,你說的空間,應該是電影本身佔用的空間,所以你做電影網站的話,你自己必須要有存放電影的伺服器,不是找一個電影網站源代碼就可以解決的!

希望能對你有幫助,好運!

Ⅶ 誰能給我一個手機游戲的源代碼啊

這個地址也有,不過直接給你吧,這樣比較好
先給你看看主要的類吧

package Game;

import DreamBubbleMidlet;

import java.io.IOException;
import java.util.Enumeration;
import java.util.Hashtable;

import javax.microedition.lci.Graphics;
import javax.microedition.lci.Image;
import javax.microedition.lci.game.GameCanvas;
import javax.microedition.lci.game.LayerManager;
import javax.microedition.lci.game.Sprite;

public class Game extends GameCanvas implements Runnable {

protected DreamBubbleMidlet dreamBubbleMidlet;

protected Graphics g;
protected Image loadingImage;
protected Image pauseImage;
protected Image cursorImage;
protected Image jackStateImage;
protected Image johnStateImage;
protected Image numberImage;

protected Sprite cursor;
protected Sprite number;
protected LayerManager cursorManager;
protected LayerManager numberManager;

protected Hashtable bombTable;
protected Map map;
protected LayerManager gameLayerManager;
protected Role player;
protected Sprite playerGhost;

protected int screenWidth;
protected int screenHeight;
protected int delay = 50;
protected int[][] bornPlace;
protected int chooseIndex;
protected int stageIndex = 1;
protected int gameClock;
protected int loadPercent;

protected boolean isPause;
protected boolean isEnd;
protected boolean isPlaying;
protected boolean isLoading;

protected Thread mainThread;

public Game(DreamBubbleMidlet dreamBubbleMidlet) {
super(false);
this.setFullScreenMode(true);
this.dreamBubbleMidlet = dreamBubbleMidlet;

this.screenWidth = this.getWidth();
this.screenHeight = this.getHeight();

try {
this.loadingImage = Image.createImage("/Game/Loading.png");
this.pauseImage = Image.createImage("/Game/Pause.png");
this.cursorImage = Image.createImage("/Game/Cursor.png");
this.jackStateImage = Image.createImage("/State/JackState.png");
this.johnStateImage = Image.createImage("/State/JohnState.png");
this.numberImage = Image.createImage("/State/Number.png");
} catch (IOException e) {
e.printStackTrace();
}

this.g = this.getGraphics();
}

public void loadStage(int stage) {
this.isEnd = false;
this.isPause = false;
this.isPlaying = false;
this.gameLayerManager = new LayerManager();
this.cursorManager = new LayerManager();
this.numberManager = new LayerManager();
this.bombTable = new Hashtable();
this.cursor = new Sprite(this.cursorImage, 32, 32);
this.number = new Sprite(this.numberImage, 12, 10);
this.loadPercent = 20;
sleep();

loadMap(stage);
this.loadPercent = 40;
sleep();

loadPlayer();
this.loadPercent = 60;
sleep();

this.gameLayerManager.append(map.getBombLayer());
this.gameLayerManager.append(map.getBuildLayer());
this.gameLayerManager.append(map.getToolLayer());
this.gameLayerManager.append(map.getFloorLayer());
this.gameLayerManager.setViewWindow(0, -5, screenWidth,
Global.MAP_HEIGHT + 5);
this.cursorManager.append(cursor);
this.numberManager.append(number);
this.loadPercent = 80;
sleep();

this.loadPercent = 100;
sleep();
isPlaying = true;
}

public void run() {
while (!isEnd) {
long beginTime = System.currentTimeMillis();
this.drawScreen();
long endTime = System.currentTimeMillis();
if (endTime - beginTime < this.delay) {
try {
Thread.sleep(this.delay - (endTime - beginTime));
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}

public void loadMap(int stage) {
switch (stage) {
case 0:
this.map = new Map(Global.MAP_BLOCK);
this.bornPlace = Global.MAP_BLOCK_BORNPLACE;
break;
case 1:
this.map = new Map(Global.MAP_FACTORY);
this.bornPlace = Global.MAP_FACTORY_BORNPLACE;
break;
case 2:
this.map = new Map(Global.MAP_FOREST);
this.bornPlace = Global.MAP_FOREST_BORNPLACE;
break;
case 3:
this.map = new Map(Global.MAP_PIRATE);
this.bornPlace = Global.MAP_PIRATE_BORNPLACE;
break;
case 4:
this.map = new Map(Global.MAP_FAUBOURG);
this.bornPlace = Global.MAP_FAUBOURG_BORNPLACE;
break;
}
}

public void loadPlayer() {
this.player = SingleGameRole.createSingleGameRole(this, Global.JACK,
this.bornPlace[0][0], this.bornPlace[0][1]);
this.gameLayerManager.append(player);
try {
this.playerGhost = new Sprite(Image.createImage("/Character/Jack.png"),
this.player.width, this.player.height);
this.gameLayerManager.append(playerGhost);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

public void playerUpdate() {
if(!this.player.isAlive)
this.playerGhost.setVisible(false);
this.playerGhost.setFrame(this.player.getFrame());
this.player.updateRole();
}

public void bombUpdate() {
Enumeration enu = this.bombTable.keys();
while (enu.hasMoreElements()) {
String key = (String) enu.nextElement();
Bomb bomb = (Bomb) (bombTable.get(key));

if (bomb.isvisable) {
bomb.update();
} else {
bombTable.remove(key);
bomb = null;
}
}
}

public void mapUpdate() {
this.map.update();
}

public void drawScreen() {
if (gameClock < 10000)
gameClock++;
else
gameClock = 0;
if (!this.isLoading) {
if (!isPause) {
this.operate();
this.bombUpdate();
this.playerUpdate();
this.mapUpdate();
g.setColor(0x000000);
g.fillRect(0, 0, getWidth(), getHeight());
this.drawState();
gameLayerManager.paint(g, 0, this.screenHeight
- Global.MAP_HEIGHT - 5);
} else {
this.drawPauseFrame();
}
} else {
this.drawLoadingFrame();
}
this.flushGraphics();
}

public void drawFailScreen() {

}

public void drawState() {
if (this.player.type == Global.JACK) {
g.drawImage(jackStateImage, 60, 5, Graphics.TOP | Graphics.LEFT);
}
if (this.player.type == Global.JOHN) {
g.drawImage(johnStateImage, 60, 5, Graphics.TOP | Graphics.LEFT);
}

this.number.setFrame(this.player.bombNums);
this.numberManager.paint(g, 101, 15);
this.number.setFrame(this.player.speed);
this.numberManager.paint(g, 133, 15);
this.number.setFrame(this.player.power);
this.numberManager.paint(g, 165, 15);
}

protected void drawPauseFrame() {
g.setColor(0x000000);
g.fillRect(0, 0, getWidth(), getHeight());
this.drawState();
if (gameClock % 5 == 0)
this.cursor.setFrame((this.cursor.getFrame() + 1) % 4);
this.gameLayerManager.paint(g, 0, this.screenHeight - Global.MAP_HEIGHT
- 5);
this.cursorManager.paint(g, screenWidth / 2 - pauseImage.getWidth() / 2
- 32, screenHeight / 2 - pauseImage.getHeight() / 2
+ this.chooseIndex * 33 + 24);
g.drawImage(pauseImage, screenWidth / 2, screenHeight / 2,
Graphics.HCENTER | Graphics.VCENTER);
}

protected void drawLoadingFrame() {
g.setColor(66, 70, 246);
g.fillRect(0, 0, screenWidth, screenHeight);

g.drawImage(loadingImage, screenWidth / 2, 2 * screenHeight / 5,
Graphics.HCENTER | Graphics.VCENTER);

g.setColor(0, 255, 0);
g.fillRect((screenWidth - 120) / 2, 2 * screenHeight / 3,
(this.loadPercent * 120) / 100, 10);

g.setColor(255, 0, 0);
g.drawRect((screenWidth - 120) / 2, 2 * screenHeight / 3, 120, 10);
}

public void showMe() {
new Loading(this.stageIndex);
if (this.mainThread == null) {
mainThread = new Thread(this);
mainThread.start();
}
this.dreamBubbleMidlet.show(this);
}

public void operate() {
int keyStates = getKeyStates();
this.playerGhost.setPosition(this.player.xCoodinate, this.player.yCoodinate);
if ((keyStates & DOWN_PRESSED) != 0) {
this.player.walk(Global.SOUTH);
} else {
if ((keyStates & UP_PRESSED) != 0) {
this.player.walk(Global.NORTH);
} else {
if ((keyStates & RIGHT_PRESSED) != 0) {
this.player.walk(Global.EAST);
} else {
if ((keyStates & LEFT_PRESSED) != 0) {
this.player.walk(Global.WEST);
}
}
}
}
}

protected void keyPressed(int key) {
if (!this.isPlaying)
return;
if (!this.isPause && key == -7) {// 右鍵
this.chooseIndex = 0;
this.pauseGame();
return;
}
if (key == 35) {// #鍵
this.nextStage();
return;
}
if (key == 42) {// *鍵
this.preStage();
return;
}
if (this.isPause) {
switch (key) {
case -1:
case -3:
if (this.chooseIndex == 0)
this.chooseIndex = 2;
else
this.chooseIndex = (this.chooseIndex - 1) % 3;
break;
case -2:
case -4:
this.chooseIndex = (this.chooseIndex + 1) % 3;
break;
case -5:// 確認鍵
case -6:// 左軟鍵
switch (chooseIndex) {
case 0:
this.continueGame();
break;
case 1:
this.restart();
break;
case 2:
this.endGame();
break;
}
break;
default:
break;
}
} else {
switch (key) {
case 53:
case -5:// 確認鍵
this.player.setBomb(this.player.getRow(), this.player.getCol());
break;
}
}
}

public void restart() {
new Loading(this.stageIndex);
}

public void continueGame() {
this.isPause = false;
this.player.play();
}

public void pauseGame() {
this.isPause = true;
this.player.stop();
}

public void endGame() {
this.isEnd = true;
this.mainThread = null;
System.gc();
try {
Thread.sleep(500);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
this.dreamBubbleMidlet.menu.showMe();
}

public void nextStage() {
if (this.stageIndex < 4) {
this.stageIndex++;
}
new Loading(this.stageIndex);
}

public void preStage() {
if (this.stageIndex > 0) {
this.stageIndex--;
}
new Loading(this.stageIndex);
}

class Loading implements Runnable {
private Thread innerThread;
private int stageIndex;

public Loading(int stageIndex) {
this.stageIndex = stageIndex;
innerThread = new Thread(this);
innerThread.start();
}

public void run() {
isLoading = true;
loadPercent = 0;
System.gc();
loadStage(stageIndex);
isLoading = false;
}
}

public void sleep() {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

這個是游戲主體類

下面是游戲的人物類

package Game;

import javax.microedition.lci.Image;
import javax.microedition.lci.game.Sprite;

public abstract class Role extends Sprite {

/**
* 人物的基本屬性
*/
protected int type;
protected int xCoodinate;
protected int yCoodinate;
protected int row;
protected int col;
protected int width;
protected int height;
protected int speed;
protected int status;
protected boolean isCanOperate = false;
protected boolean isAlive = true;

/**
* 人物放置炸彈的基本屬性
*/
protected int power;
protected int bombNums;

protected int characterClock = 0;
protected int deadTime = 0;

protected Game game;

protected Role(Image image, int width, int Height, Game game) {
super(image, width, Height);
this.game = game;
}

/**
* 人物拾起道具
* @param tool
*/
public abstract void pickupTool(int tool);
/**
* 碰撞檢測以及坐標的改變,如果對行走條件有特殊需求,既可以在這里寫自己的條件
* @param direction
*/
public abstract void collisionCheck(int direction);

public void updateRole() {
if (this.characterClock < 10000) {
this.characterClock++;
} else {
this.characterClock = 100;
}

int row = this.getRow();
int col = this.getCol();

if (this.isAlive) {

int tool = this.game.map.getToolLayer().getCell(col, row);

if (tool > 0) {
this.pickupTool(tool);
this.game.map.getToolLayer().setCell(col, row, 0);
}

if (this.game.map.hasFeature(row, col, Global.DEADLY)) {
this.isAlive = false;
return;
}

if (this.status == Global.BORN
&& this.characterClock > Global.BORN_TIME) {
this.status = Global.SOUTH;
this.setFrame(Global.SOUTH * 6);
this.isCanOperate = true;
}

if (this.status == Global.BORN) {
if (this.characterClock % 2 == 0)
this.setFrame(Global.BORN * 6 + (this.getFrame() - 1) % 4);
return;
}

} else {
this.isCanOperate = false;
if (this.deadTime <= 20) {
this.deadTime++;
} else {
this.deadTime = 100;
this.setVisible(false);
return;
}

if (this.characterClock % 2 == 0) {
if (this.getFrame() < Global.DEAD * 6) {
this.setFrame(Global.DEAD * 6);
} else {
if (this.getFrame() < 29) {
this.setFrame(this.getFrame() + 1);
} else {
if (this.characterClock % 4 == 0) {
this.setFrame(29);
this.setVisible(true);
} else {
this.setVisible(false);
}
}
}
}
}
}

public void walk(int direction) {
if (!isAlive)
return;
if (!isCanOperate)
return;
if(direction==9) return;
this.collisionCheck(direction);

if (this.characterClock % 2 == 0) {
if (this.status == direction) {
this.setFrame(this.status * 6 + (this.getFrame() + 1) % 6);
} else {
this.status = direction;
this.setFrame(this.status * 6);
}
}
this.setPosition(xCoodinate, yCoodinate);
}

public void stop() {
this.isCanOperate = false;
}

public void play() {
this.isCanOperate = true;
}

public abstract void setBomb(int row, int col);

public void increaseBomb() {
if (this.bombNums < Global.MAX_BOMB_NUMBER)
this.bombNums++;
}

public int getRow() {
return getRow(getBottomY(yCoodinate) - Global.MAP_CELL / 2);
}

public int getCol() {
return getCol(xCoodinate + Global.MAP_CELL / 2);
}

protected int getBottomY(int y) {
return y + this.height - 1;
}

protected int getRightX(int x) {
return x + Global.MAP_CELL - 1;
}

protected int getPreY(int y) {
return getBottomY(y) + 1 - Global.MAP_CELL;
}

protected int getRow(int x) {
return x / Global.MAP_CELL;
}

protected int getCol(int y) {
return y / Global.MAP_CELL;
}
}

我的QQ是609419340

看不明白的可以隨時來問我哦,還可以當時傳給你撒

Ⅷ 元銅十二堂

您的這一個錢幣,是中華民國當二十銅元,是大開門的老的真品,品相好的市場上一般喊價在30元左右!

熱點內容
領航s1配置怎麼樣 發布:2025-01-26 09:58:10 瀏覽:763
公司區域網搭建伺服器搭建 發布:2025-01-26 09:16:56 瀏覽:433
android裁剪圓形圖片 發布:2025-01-26 09:05:56 瀏覽:411
小貸源碼 發布:2025-01-26 08:20:58 瀏覽:536
更換電腦名登錄伺服器 發布:2025-01-26 07:56:52 瀏覽:240
後台phpjava 發布:2025-01-26 07:12:34 瀏覽:657
微信解綁密碼是什麼 發布:2025-01-26 06:50:07 瀏覽:734
app如何訪問伺服器 發布:2025-01-26 06:36:56 瀏覽:741
拳皇安卓單機哪裡下載 發布:2025-01-26 06:30:46 瀏覽:539
注冊會員時積分消費密碼是什麼 發布:2025-01-26 06:30:45 瀏覽:247