當前位置:首頁 » 操作系統 » 貪吃蛇游戲源碼

貪吃蛇游戲源碼

發布時間: 2022-03-12 15:51:01

❶ 求用vbs編寫的貪吃蛇源代碼

需用VB實現,代碼如下

'定義蛇的運動速度枚舉值
Private Enum tpsSpeed
QUICKLY = 0
SLOWLY = 1
End Enum

'定義蛇的運動方向枚舉值
Private Enum tpsDirection
D_UP = 38
D_DOWN = 40
D_LEFT = 37
D_RIGHT = 39
End Enum

'定義運動區域4個禁區的枚舉值
Private Enum tpsForbiddenZone
FZ_TOP = 30
FZ_BOTTOM = 5330
FZ_LEFT = 30
FZ_RIGHT = 5730
End Enum

'定義蛇頭及身體初始化數枚舉值
Private Enum tpsSnake
SNAKEONE = 1
SNAKETWO = 2
SNAKETHREE = 3
SNAKEFOUR = 4
End Enum

'定義蛇寬度的常量
Private Const SNAKEWIDTH As Integer = 100

'該過程用於顯示游戲信息
Private Sub Form_Load()
Me.Show
Me.lblTitle = "BS貪食蛇 — (版本 " & App.Major & "." & App.Minor & "." & App.Revision & ")"
Me.Caption = Me.lblTitle.Caption
frmSplash.Show 1
End Sub

'該過程用於使窗體恢復原始大小
Private Sub Form_Resize()
If Me.WindowState <> 1 Then
Me.Caption = ""
Me.Height = 6405 '窗體高度為 6405 緹
Me.Width = 8535 '窗體寬度為 8535 緹
Me.Left = (Screen.Width - Width) \ 2
Me.Top = (Screen.Height - Height) \ 2
End If
End Sub

'該過程用於重新開始開始游戲
Private Sub cmdGameStart_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Beep
msg = MsgBox("您確認要重新開始游戲嗎?", 4 + 32, "BS貪食蛇")
If msg = 6 Then Call m_subGameInitialize
End Sub

'該過程用於暫停/運行游戲
Private Sub chkPause_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.chkPause.Caption = "暫停游戲(&P)" Then
Me.tmrSnakeMove.Enabled = False
Me.tmrGameTime.Enabled = False
Me.picMoveArea.Enabled = False
Me.lblPauseLab.Visible = True
Me.chkPause.Caption = "繼續游戲(&R)"
Else
Me.tmrSnakeMove.Enabled = True
Me.tmrGameTime.Enabled = True
Me.picMoveArea.Enabled = True
Me.lblPauseLab.Visible = False
Me.chkPause.Caption = "暫停游戲(&P)"
End If
End Sub

'該過程用於顯示游戲規則
Private Sub cmdGameRules_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Beep
MsgBox " BS貪食蛇:一個規則最簡單的趣味游戲,您將用鍵盤" & Chr(13) & _
"上的4個方向鍵來控制蛇的運動方向。在運動過程中蛇" & Chr(13) & _
"不能後退,蛇的頭部也不能接觸到運動區域的邊線以外" & Chr(13) & _
"和蛇自己的身體,否則就游戲失敗。在吃掉隨機出現的" & Chr(13) & _
"果子後,蛇的身體會變長,越長難度越大。祝您好運!!", 0 + 64, "游戲規則"
End Sub

'該過程用於顯示游戲開發信息
Private Sub cmdAbout_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Beep
MsgBox "BS貪食蛇" & "(V-" & App.Major & "." & App.Minor & "版本)" & Chr(13) & Chr(13) & _
"" & Chr(13) & Chr(13) & _
"由PigheadPrince設計製作" & Chr(13) & _
"CopyRight(C)2002,BestSoft.TCG", 0, "關於本游戲"
End Sub

'該過程用於退出遊戲
Private Sub cmdExit_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Beep
msg = MsgBox("您要退出本游戲嗎?", 4 + 32, "BS貪食蛇")
Select Case msg
Case 6
End
Case 7
Me.chkWindowButton(2).Value = 0
Exit Sub
End Select
End Sub

'該過程用於拖動窗體_(點擊圖標)
Private Sub imgWindowTop_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
ReleaseCapture
SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MOVE, 0
End Sub

'該共用過程用於處理窗體控制按鈕組的相關操作_(鎖定、最小化、退出)
Private Sub chkWindowButton_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button <> 1 Then Exit Sub
Select Case Index
Case 0 '鎖定窗體
If Me.chkWindowButton(0).Value = 1 Then
Me.imgWindowTop.BorderStyle = 0
Me.imgWindowTop.Enabled = False
Else
Me.imgWindowTop.BorderStyle = 1
Me.imgWindowTop.Enabled = True
End If
Case 1 '最小化
Me.WindowState = 1
Me.chkWindowButton(1).Value = 0
Me.Caption = "BS貪食蛇 — (V-" & App.Major & "." & App.Minor & "版本)"
Case 2 '退出
Beep
msg = MsgBox("您要退出本游戲嗎?", 4 + 32, "BS貪食蛇")
Select Case msg
Case 6
End
Case 7
Me.chkWindowButton(2).Value = 0
Exit Sub
End Select
End Select
End Sub

'該過程用於設置蛇運動速度的快慢
Private Sub hsbGameSpeed_Change()
Me.tmrSnakeMove.Interval = Me.hsbGameSpeed.Value
End Sub

'該過程用於通過鍵盤的方向鍵改變蛇的運動方向
Private Sub picMoveArea_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case g_intDirection
Case D_UP
If KeyCode = D_DOWN Then Exit Sub
Case D_DOWN
If KeyCode = D_UP Then Exit Sub
Case D_LEFT
If KeyCode = D_RIGHT Then Exit Sub
Case D_RIGHT
If KeyCode = D_LEFT Then Exit Sub
End Select
g_intDirection = KeyCode
End Sub

'該計時循環過程用於計算游戲耗費的秒數並顯示
Private Sub tmrGameTime_Timer()
g_lngGameTime = g_lngGameTime + 1
Me.lblGameTime.Caption = g_lngGameTime & "秒"
End Sub

'該計時循環過程用於控制蛇的行動軌跡
Private Sub tmrSnakeMove_Timer()
Dim lngSnakeX As Long, lngSnakeY As Long, lngSnakeColor As Long
Dim lngPointX As Long, lngPointY As Long, lngPointColor As Long
Randomize
Me.picMoveArea.SetFocus
Me.picMoveArea.Cls
'確認蛇頭的運動方向並獲取新的位置
Select Case g_intDirection
Case D_UP '向上運動
g_udtSnake(SNAKEONE).Snake_CurX = g_udtSnake(SNAKEONE).Snake_OldX
g_udtSnake(SNAKEONE).Snake_CurY = g_udtSnake(SNAKEONE).Snake_OldY
g_udtSnake(SNAKEONE).Snake_CurY = g_udtSnake(SNAKEONE).Snake_CurY - SNAKEWIDTH
Case D_DOWN '向下運動
g_udtSnake(SNAKEONE).Snake_CurX = g_udtSnake(SNAKEONE).Snake_OldX
g_udtSnake(SNAKEONE).Snake_CurY = g_udtSnake(SNAKEONE).Snake_OldY
g_udtSnake(SNAKEONE).Snake_CurY = g_udtSnake(SNAKEONE).Snake_CurY + SNAKEWIDTH
Case D_LEFT '向左運動
g_udtSnake(SNAKEONE).Snake_CurX = g_udtSnake(SNAKEONE).Snake_OldX
g_udtSnake(SNAKEONE).Snake_CurX = g_udtSnake(SNAKEONE).Snake_CurX - SNAKEWIDTH
g_udtSnake(SNAKEONE).Snake_CurY = g_udtSnake(SNAKEONE).Snake_OldY
Case D_RIGHT '向右運動
g_udtSnake(SNAKEONE).Snake_CurX = g_udtSnake(SNAKEONE).Snake_OldX
g_udtSnake(SNAKEONE).Snake_CurX = g_udtSnake(SNAKEONE).Snake_CurX + SNAKEWIDTH
g_udtSnake(SNAKEONE).Snake_CurY = g_udtSnake(SNAKEONE).Snake_OldY
End Select
'根據新的位置繪制蛇頭
lngSnakeX = g_udtSnake(SNAKEONE).Snake_CurX
lngSnakeY = g_udtSnake(SNAKEONE).Snake_CurY
lngSnakeColor = g_udtSnake(SNAKEONE).Snake_Color
Me.picMoveArea.PSet (lngSnakeX, lngSnakeY), lngSnakeColor
'移動蛇身體其他部分的位置
For i = 2 To g_intSnakeLength
g_udtSnake(i).Snake_CurX = g_udtSnake(i - 1).Snake_OldX
g_udtSnake(i).Snake_CurY = g_udtSnake(i - 1).Snake_OldY
lngSnakeX = g_udtSnake(i).Snake_CurX
lngSnakeY = g_udtSnake(i).Snake_CurY
lngSnakeColor = g_udtSnake(i).Snake_Color
Me.picMoveArea.PSet (lngSnakeX, lngSnakeY), lngSnakeColor
Next i
'更新蛇舊的坐標位置
For j = 1 To g_intSnakeLength
g_udtSnake(j).Snake_OldX = g_udtSnake(j).Snake_CurX
g_udtSnake(j).Snake_OldY = g_udtSnake(j).Snake_CurY
Next j
'判斷蛇在移動中是否到了禁區而導致游戲失敗
If m_funMoveForbiddenZone(g_udtSnake(SNAKEONE).Snake_CurX, g_udtSnake(SNAKEONE).Snake_CurY) Then
Beep
MsgBox "您的蛇移動到了禁區,游戲失敗!", 0 + 16, "BS貪食蛇"
Me.tmrSnakeMove.Enabled = False
Me.tmrGameTime.Enabled = False
Me.picMoveArea.Visible = False
Exit Sub
End If
'判斷蛇在移動中是否碰到了自己的身體而導致游戲失敗
If m_funTouchSnakeBody(g_udtSnake(SNAKEONE).Snake_CurX, g_udtSnake(SNAKEONE).Snake_CurY) Then
Beep
MsgBox "您的蛇在移動中碰到了自己的身體,游戲失敗!", 0 + 16, "BS貪食蛇"
Me.tmrSnakeMove.Enabled = False
Me.tmrGameTime.Enabled = False
Me.picMoveArea.Visible = False
Exit Sub
End If
'判斷蛇是否吃到了果子
If m_funEatPoint(g_udtSnake(SNAKEONE).Snake_CurX, g_udtSnake(SNAKEONE).Snake_CurY) Then
'累加玩家的得分並刷新得分顯示
g_intPlayerScore = g_intPlayerScore + 1
Me.lblYourScore.Caption = g_intPlayerScore & "分"
Call m_subAddSnake '加長蛇的身體
Call m_subGetPoint '獲取下一個果子的位置和顏色
Else
'繪制果子
lngPointX = g_udtPoint.Point_X
lngPointY = g_udtPoint.Point_Y
lngPointColor = g_udtPoint.Point_Color
Me.picMoveArea.PSet (lngPointX, lngPointY), lngPointColor
End If
End Sub

'該私有子過程用於初始化游戲
Private Sub m_subGameInitialize()
Erase g_udtSnake '清空蛇的結構數組
g_intPlayerScore = 0 '清空玩家的得分
g_lngGameTime = 0 '清空游戲耗費的秒數
g_intDirection = D_DOWN '設定蛇的初始運動方向為下
g_intSnakeLength = 4 '設定蛇的初始長度
ReDim g_udtSnake(1 To g_intSnakeLength) '重新定義蛇的長度
'定義蛇頭部的數據
With g_udtSnake(SNAKEONE)
.Snake_OldX = 530
.Snake_OldY = 530
.Snake_Color = vbBlack
End With
'定義蛇身第2節的數據
With g_udtSnake(SNAKETWO)
.Snake_OldX = 530
.Snake_OldY = 430
.Snake_Color = vbGreen
End With
'定義蛇身第3節的數據
With g_udtSnake(SNAKETHREE)
.Snake_OldX = 530
.Snake_OldY = 330
.Snake_Color = vbYellow
End With
'定義蛇身第4節的數據
With g_udtSnake(SNAKEFOUR)
.Snake_OldX = 530
.Snake_OldY = 230
.Snake_Color = vbRed
End With
Me.picMoveArea.Visible = True
Me.lblYourScore.Caption = g_intPlayerScore & "分"
Me.lblGameTime.Caption = g_lngGameTime & "秒"
Me.tmrSnakeMove.Interval = Me.hsbGameSpeed.Value
Me.tmrSnakeMove.Enabled = True
Me.tmrGameTime.Enabled = True
Call m_subGetPoint '獲取第一個果子的位置和顏色
End Sub

接下面的

❷ 有貪吃蛇的源代碼 拜託了 !

你是用什麼編的VC?還是turbo c?
我在網上找了下,發現了一個trubo c 的應該可以用,在VC上調試就一個錯誤,畫圖函數不支持,你試一試吧。
#define N 200
#include <graphics.h>
#include <stdlib.h>
#include <dos.h>
#define LEFT 0x4b00
#define RIGHT 0x4d00
#define DOWN 0x5000
#define UP 0x4800
#define ESC 0x011b
int i,key;
int score=0;/*得分*/
int gamespeed=50000;/*游戲速度自己調整*/
struct Food
{
int x;/*食物的橫坐標*/
int y;/*食物的縱坐標*/
int yes;/*判斷是否要出現食物的變數*/
}food;/*食物的結構體*/
struct Snake
{
int x[N];
int y[N];
int node;/*蛇的節數*/
int direction;/*蛇移動方向*/
int life;/* 蛇的生命,0活著,1死亡*/
}snake;
void Init(void);/*圖形驅動*/
void Close(void);/*圖形結束*/
void DrawK(void);/*開始畫面*/
void GameOver(void);/*結束游戲*/
void GamePlay(void);/*玩游戲具體過程*/
void PrScore(void);/*輸出成績*/
/*主函數*/
void main(void)
{
Init();/*圖形驅動*/
DrawK();/*開始畫面*/
GamePlay();/*玩游戲具體過程*/
Close();/*圖形結束*/
}
/*圖形驅動*/
void Init(void)
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc");
cleardevice();
}
/*開始畫面,左上角坐標為(50,40),右下角坐標為(610,460)的圍牆*/
void DrawK(void)
{
/*setbkcolor(LIGHTGREEN);*/
setcolor(11);
setlinestyle(SOLID_LINE,0,THICK_WIDTH);/*設置線型*/
for(i=50;i<=600;i+=10)/*畫圍牆*/
{
rectangle(i,40,i+10,49); /*上邊*/
rectangle(i,451,i+10,460);/*下邊*/
}
for(i=40;i<=450;i+=10)
{
rectangle(50,i,59,i+10); /*左邊*/
rectangle(601,i,610,i+10);/*右邊*/
}
}
/*玩游戲具體過程*/
void GamePlay(void)
{
randomize();/*隨機數發生器*/
food.yes=1;/*1表示需要出現新食物,0表示已經存在食物*/
snake.life=0;/*活著*/
snake.direction=1;/*方嚮往右*/
snake.x[0]=100;snake.y[0]=100;/*蛇頭*/
snake.x[1]=110;snake.y[1]=100;
snake.node=2;/*節數*/
PrScore();/*輸出得分*/
while(1)/*可以重復玩游戲,壓ESC鍵結束*/
{
while(!kbhit())/*在沒有按鍵的情況下,蛇自己移動身體*/
{
if(food.yes==1)/*需要出現新食物*/
{
food.x=rand()%400+60;
food.y=rand()%350+60;
while(food.x%10!=0)/*食物隨機出現後必須讓食物能夠在整格內,這樣才可以讓蛇吃到*/
food.x++;
while(food.y%10!=0)
food.y++;
food.yes=0;/*畫面上有食物了*/
}
if(food.yes==0)/*畫面上有食物了就要顯示*/
{
setcolor(GREEN);
rectangle(food.x,food.y,food.x+10,food.y-10);
}
for(i=snake.node-1;i>0;i--)/*蛇的每個環節往前移動,也就是貪吃蛇的關鍵演算法*/
{
snake.x[i]=snake.x[i-1];
snake.y[i]=snake.y[i-1];
}
/*1,2,3,4表示右,左,上,下四個方向,通過這個判斷來移動蛇頭*/
switch(snake.direction)
{
case 1:snake.x[0]+=10;break;
case 2: snake.x[0]-=10;break;
case 3: snake.y[0]-=10;break;
case 4: snake.y[0]+=10;break;
}
for(i=3;i<snake.node;i++)/*從蛇的第四節開始判斷是否撞到自己了,因為蛇頭為兩節,第三節不可能拐過來*/
{
if(snake.x[i]==snake.x[0]&&snake.y[i]==snake.y[0])
{
GameOver();/*顯示失敗*/
snake.life=1;
break;
}
}
if(snake.x[0]<55||snake.x[0]>595||snake.y[0]<55||
snake.y[0]>455)/*蛇是否撞到牆壁*/
{
GameOver();/*本次游戲結束*/
snake.life=1; /*蛇死*/
}
if(snake.life==1)/*以上兩種判斷以後,如果蛇死就跳出內循環,重新開始*/
break;
if(snake.x[0]==food.x&&snake.y[0]==food.y)/*吃到食物以後*/
{
setcolor(0);/*把畫面上的食物東西去掉*/
rectangle(food.x,food.y,food.x+10,food.y-10);
snake.x[snake.node]=-20;snake.y[snake.node]=-20;
/*新的一節先放在看不見的位置,下次循環就取前一節的位置*/
snake.node++;/*蛇的身體長一節*/
food.yes=1;/*畫面上需要出現新的食物*/
score+=10;
PrScore();/*輸出新得分*/
}
setcolor(4);/*畫出蛇*/
for(i=0;i<snake.node;i++)
rectangle(snake.x[i],snake.y[i],snake.x[i]+10,
snake.y[i]-10);
delay(gamespeed);
setcolor(0);/*用黑色去除蛇的的最後一節*/
rectangle(snake.x[snake.node-1],snake.y[snake.node-1],
snake.x[snake.node-1]+10,snake.y[snake.node-1]-10);
} /*endwhile(!kbhit)*/
if(snake.life==1)/*如果蛇死就跳出循環*/
break;
key=bioskey(0);/*接收按鍵*/
if(key==ESC)/*按ESC鍵退出*/
break;
else
if(key==UP&&snake.direction!=4)
/*判斷是否往相反的方向移動*/
snake.direction=3;
else
if(key==RIGHT&&snake.direction!=2)
snake.direction=1;
else
if(key==LEFT&&snake.direction!=1)
snake.direction=2;
else
if(key==DOWN&&snake.direction!=3)
snake.direction=4;
}/*endwhile(1)*/
}
/*游戲結束*/
void GameOver(void)
{
cleardevice();
PrScore();
setcolor(RED);
settextstyle(0,0,4);
outtextxy(200,200,"GAME OVER");
getch();
}
/*輸出成績*/
void PrScore(void)
{
char str[10];
setfillstyle(SOLID_FILL,YELLOW);
bar(50,15,220,35);
setcolor(6);
settextstyle(0,0,2);
sprintf(str,"score:%d",score);
outtextxy(55,20,str);
}
/*圖形結束*/
void Close(void)
{
getch();
closegraph();
}

❸ 跪求一貪吃蛇游戲 打包 源代碼 java語言

#include <reg51.h>
#define uchar unsigned char
#define SNAKE 20 //最大長度
#define TIME 50 //顯示延時時間
#define SPEED 71 //速度控制
//#define keyenable 1
sbit keyenable=P3^6; //方向使能
/*sbit keyx=P0^1; //左右
sbit keyy=P0^2; //上下 */
//sbit up=P0^0;
sbit up=P3^3; //down
sbit down=P3^1;
sbit right=P3^2;
sbit left=P3^4;
uchar x[SNAKE+1];
uchar y[SNAKE+1];
uchar time,n,i,e; //延時時間,當前蛇長,通用循環變數,當前速度
char addx,addy; //位移偏移量
/********************
延時程序
*********************/
void delay(char MS)
{
char us,usn;
while(MS!=0)
{
usn = 0;
while(usn!=0)
{
us=0xff;
while (us!=0){us--;};
usn--;
}
MS--;
}
}
/*******************************************
判斷碰撞
*******************************************/
bit knock()
{bit k;
k=0;
if(x[1]>7||y[1]>7)k=1; //撞牆
for(i=2;i<n;i++)if((x[1]==x[i])&(y[1]==y[i]))k=1; //撞自己
return k;
}
/*****************
上下左右鍵位處理
*****************/
void turnkey()// interrupt 0 using 2
{//up=1;
if(keyenable)
{
if(left){addy=0;if(addx!=1)addx=-1; else addx=1;}
if(right){addy=0;if(addx!=-1)addx=1; else addx=-1;}
if(up){addx=0;if(addy!=-1)addy=1; else addy=-1;}
if(down){addx=0;if(addy!=1)addy=-1; else addy=1;}
/*if(keyy)
{addy=0; //左右
if(keyx)if(addx==-1)addx=-1; else addx=1; //左
else
if(addx==1)addx=1; else addx=-1; //右
}
else
{addx=0; //上下
if(keyx)if(addy==1)addy=1; else addy=-1; //下
else
if(addy==-1)addy=-1; else addy=1; //上
} */
}
}
/*****************
乘方程序
*****************/
uchar mux(uchar temp)
{
if(temp==7)return 128;
if(temp==6)return 64;
if(temp==5)return 32;
if(temp==4)return 16;
if(temp==3)return 8;
if(temp==2)return 4;
if(temp==1)return 2;
if(temp==0)return 1;
return 0;
}
/*****************
顯示時鍾 顯示程序
*****************/
void timer0(uchar k)
{while(k--)
{for(i=0;i<SNAKE+1;i++)
{P2=mux(x[i]);P1=255-mux(y[i]);
turnkey(); //上下左右鍵位處理
delay(TIME); //顯示延遲
P2=0x00;P1=0xff;
}}
}
/*****************
主程序
*****************/
void main(void)
{e=SPEED;
P0=0x00;
P1=0xff;
P2=0x00;
P3=0x00;
while(1)
{//if(keyenable==1){P1=0x00;P2=0xff;}else{P1=0xff;P2=0x00;}
for(i=3;i<SNAKE+1;i++)x[i]=100;for(i=3;i<SNAKE+1;i++)y[i]=100;//初始化
x[0]=4;y[0]=4; //果子
n=3; //蛇長 n=-1
x[1]=1;y[1]=0; //蛇頭
x[2]=0;y[2]=0; //蛇尾1
addx=0;addy=0; //位移偏移
//k=1;
while(1){if(keyenable)break;timer0(1);}
while(1)
{timer0(e);
if(knock()){e=SPEED;break;} //判斷碰撞
if((x[0]==x[1]+addx)&(y[0]==y[1]+addy)) //是否吃東西
{n++;
if(n==SNAKE+1)
{n=3;e=e-10;
for(i=3;i<SNAKE+1;i++)x[i]=100;
for(i=3;i<SNAKE+1;i++)y[i]=100;
}
x[0]=x[n-2];
y[0]=y[n-2];
}
for(i=n-1;i>1;i--){x[i]=x[i-1];y[i]=y[i-1];}
//x[n-1]=x[2];y[n-1]=y[2];
x[1]=x[2]+addx;y[1]=y[2]+addy; //移動
}
}
}

❹ 貪吃蛇游戲的源代碼



貪吃蛇源碼

<!doctype html>
<html>
<body style='overflow:hidden'>
<canvas id="can" width="400" height="400" style="background:Black;display: block;margin:20px auto;"></canvas>
<script>
var sn = [ 42, 41 ], dz = 43, fx = 1, n, ctx = document.getElementById("can").getContext("2d");
function draw(t, c) {
ctx.fillStyle = c;
ctx.fillRect(t % 20 * 20 + 1, ~~(t / 20) * 20 + 1, 18, 18);
}
document.onkeydown = function(e) {
fx = sn[1] - sn[0] == (n = [ -1, -20, 1, 20 ][(e || event).keyCode - 37] || fx) ? fx : n
};
!function() {
sn.unshift(n = sn[0] + fx);
if (sn.indexOf(n, 1) > 0 || n<0||n>399 || fx == 1 && n % 20 == 0 || fx == -1 && n % 20 == 19)
return alert("GAME OVER");
draw(n, "Lime");
if (n == dz) {
while (sn.indexOf(dz = ~~(Math.random() * 400)) >= 0);
draw(dz, "Yellow");
} else
draw(sn.pop(), "Black");
setTimeout(arguments.callee, 130);
}();
</script>
</body>
</html>

❺ 求VC中貪吃蛇的源代碼

#define N 200
#include <graphics.h>
#include <stdlib.h>
#include <dos.h>
#define LEFT 0x4b00
#define RIGHT 0x4d00
#define DOWN 0x5000
#define UP 0x4800
#define ESC 0x011b
int i,key;
int score=0;/*得分*/
int gamespeed=50000;/*游戲速度自己調整*/
struct Food
{
int x;/*食物的橫坐標*/
int y;/*食物的縱坐標*/
int yes;/*判斷是否要出現食物的變數*/
}food;/*食物的結構體*/
struct Snake
{
int x[N];
int y[N];
int node;/*蛇的節數*/
int direction;/*蛇移動方向*/
int life;/* 蛇的生命,0活著,1死亡*/
}snake;
void Init(void);/*圖形驅動*/
void Close(void);/*圖形結束*/
void DrawK(void);/*開始畫面*/
void GameOver(void);/*結束游戲*/
void GamePlay(void);/*玩游戲具體過程*/
void PrScore(void);/*輸出成績*/
/*主函數*/
void main(void)
{
Init();/*圖形驅動*/
DrawK();/*開始畫面*/
GamePlay();/*玩游戲具體過程*/
Close();/*圖形結束*/
}
/*圖形驅動*/
void Init(void)
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc");
cleardevice();
}
/*開始畫面,左上角坐標為(50,40),右下角坐標為(610,460)的圍牆*/
void DrawK(void)
{
/*setbkcolor(LIGHTGREEN);*/
setcolor(11);
setlinestyle(SOLID_LINE,0,THICK_WIDTH);/*設置線型*/
for(i=50;i<=600;i+=10)/*畫圍牆*/
{
rectangle(i,40,i+10,49); /*上邊*/
rectangle(i,451,i+10,460);/*下邊*/
}
for(i=40;i<=450;i+=10)
{
rectangle(50,i,59,i+10); /*左邊*/
rectangle(601,i,610,i+10);/*右邊*/
}
}
/*玩游戲具體過程*/
void GamePlay(void)
{
randomize();/*隨機數發生器*/
food.yes=1;/*1表示需要出現新食物,0表示已經存在食物*/
snake.life=0;/*活著*/
snake.direction=1;/*方嚮往右*/
snake.x[0]=100;snake.y[0]=100;/*蛇頭*/
snake.x[1]=110;snake.y[1]=100;
snake.node=2;/*節數*/
PrScore();/*輸出得分*/
while(1)/*可以重復玩游戲,壓ESC鍵結束*/
{
while(!kbhit())/*在沒有按鍵的情況下,蛇自己移動身體*/
{
if(food.yes==1)/*需要出現新食物*/
{
food.x=rand()%400+60;
food.y=rand()%350+60;
while(food.x%10!=0)/*食物隨機出現後必須讓食物能夠在整格內,這樣才可以讓蛇吃到*/
food.x++;
while(food.y%10!=0)
food.y++;
food.yes=0;/*畫面上有食物了*/
}
if(food.yes==0)/*畫面上有食物了就要顯示*/
{
setcolor(GREEN);
rectangle(food.x,food.y,food.x+10,food.y-10);
}
for(i=snake.node-1;i>0;i--)/*蛇的每個環節往前移動,也就是貪吃蛇的關鍵演算法*/
{
snake.x[i]=snake.x[i-1];
snake.y[i]=snake.y[i-1];
}
/*1,2,3,4表示右,左,上,下四個方向,通過這個判斷來移動蛇頭*/
switch(snake.direction)
{
case 1:snake.x[0]+=10;break;
case 2: snake.x[0]-=10;break;
case 3: snake.y[0]-=10;break;
case 4: snake.y[0]+=10;break;
}
for(i=3;i<snake.node;i++)/*從蛇的第四節開始判斷是否撞到自己了,因為蛇頭為兩節,第三節不可能拐過來*/
{
if(snake.x[i]==snake.x[0]&&snake.y[i]==snake.y[0])
{
GameOver();/*顯示失敗*/
snake.life=1;
break;
}
}
if(snake.x[0]<55||snake.x[0]>595||snake.y[0]<55||
snake.y[0]>455)/*蛇是否撞到牆壁*/
{
GameOver();/*本次游戲結束*/
snake.life=1; /*蛇死*/
}
if(snake.life==1)/*以上兩種判斷以後,如果蛇死就跳出內循環,重新開始*/
break;
if(snake.x[0]==food.x&&snake.y[0]==food.y)/*吃到食物以後*/
{
setcolor(0);/*把畫面上的食物東西去掉*/
rectangle(food.x,food.y,food.x+10,food.y-10);
snake.x[snake.node]=-20;snake.y[snake.node]=-20;
/*新的一節先放在看不見的位置,下次循環就取前一節的位置*/
snake.node++;/*蛇的身體長一節*/
food.yes=1;/*畫面上需要出現新的食物*/
score+=10;
PrScore();/*輸出新得分*/
}
setcolor(4);/*畫出蛇*/
for(i=0;i<snake.node;i++)
rectangle(snake.x[i],snake.y[i],snake.x[i]+10,
snake.y[i]-10);
delay(gamespeed);
setcolor(0);/*用黑色去除蛇的的最後一節*/
rectangle(snake.x[snake.node-1],snake.y[snake.node-1],
snake.x[snake.node-1]+10,snake.y[snake.node-1]-10);
} /*endwhile(!kbhit)*/
if(snake.life==1)/*如果蛇死就跳出循環*/
break;
key=bioskey(0);/*接收按鍵*/
if(key==ESC)/*按ESC鍵退出*/
break;
else
if(key==UP&&snake.direction!=4)
/*判斷是否往相反的方向移動*/
snake.direction=3;
else
if(key==RIGHT&&snake.direction!=2)
snake.direction=1;
else
if(key==LEFT&&snake.direction!=1)
snake.direction=2;
else
if(key==DOWN&&snake.direction!=3)
snake.direction=4;
}/*endwhile(1)*/
}
/*游戲結束*/
void GameOver(void)
{
cleardevice();
PrScore();
setcolor(RED);
settextstyle(0,0,4);
outtextxy(200,200,"GAME OVER");
getch();
}
/*輸出成績*/
void PrScore(void)
{
char str[10];
setfillstyle(SOLID_FILL,YELLOW);
bar(50,15,220,35);
setcolor(6);
settextstyle(0,0,2);
sprintf(str,"score:%d",score);
outtextxy(55,20,str);
}
/*圖形結束*/
void Close(void)
{
getch();
closegraph();
}

❻ 求一段JAVA編寫的貪吃蛇小程序源代碼

用MVC方式實現的貪吃蛇游戲,共有4個類。運行GreedSnake運行即可。主要是觀察者模式的使用,我已經添加了很多注釋了。
1、
/*
* 程序名稱:貪食蛇
* 原作者:BigF
* 修改者:algo
* 說明:我以前也用C寫過這個程序,現在看到BigF用Java寫的這個,發現雖然作者自稱是Java的初學者,
* 但是明顯編寫程序的素養不錯,程序結構寫得很清晰,有些細微得地方也寫得很簡潔,一時興起之
* 下,我認真解讀了這個程序,發現數據和表現分開得很好,而我近日正在學習MVC設計模式,
* 因此嘗試把程序得結構改了一下,用MVC模式來實現,對源程序得改動不多。
* 我同時也為程序增加了一些自己理解得注釋,希望對大家閱讀有幫助。
*/

package mvcTest;

/**
* @author WangYu
* @version 1.0
* Description:
* </pre>
* Create on :Date :2005-6-13 Time:15:57:16
* LastModified:
* History:
*/
public class GreedSnake {
public static void main(String[] args) {
SnakeModel model = new SnakeModel(20,30);
SnakeControl control = new SnakeControl(model);
SnakeView view = new SnakeView(model,control);
//添加一個觀察者,讓view成為model的觀察者
model.addObserver(view);

(new Thread(model)).start();
}
}

-------------------------------------------------------------
2、

package mvcTest;

//SnakeControl.java
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

/**
* MVC中的Controler,負責接收用戶的操作,並把用戶操作通知Model
*/
public class SnakeControl implements KeyListener{
SnakeModel model;

public SnakeControl(SnakeModel model){
this.model = model;
}

public void keyPressed(KeyEvent e) {
int keyCode = e.getKeyCode();
if (model.running){ // 運行狀態下,處理的按鍵
switch (keyCode) {
case KeyEvent.VK_UP:
model.changeDirection(SnakeModel.UP);
break;
case KeyEvent.VK_DOWN:
model.changeDirection(SnakeModel.DOWN);
break;
case KeyEvent.VK_LEFT:
model.changeDirection(SnakeModel.LEFT);
break;
case KeyEvent.VK_RIGHT:
model.changeDirection(SnakeModel.RIGHT);
break;
case KeyEvent.VK_ADD:
case KeyEvent.VK_PAGE_UP:
model.speedUp();
break;
case KeyEvent.VK_SUBTRACT:
case KeyEvent.VK_PAGE_DOWN:
model.speedDown();
break;
case KeyEvent.VK_SPACE:
case KeyEvent.VK_P:
model.changePauseState();
break;
default:
}
}

// 任何情況下處理的按鍵,按鍵導致重新啟動游戲
if (keyCode == KeyEvent.VK_R ||
keyCode == KeyEvent.VK_S ||
keyCode == KeyEvent.VK_ENTER) {
model.reset();
}
}

public void keyReleased(KeyEvent e) {
}

public void keyTyped(KeyEvent e) {
}
}
-------------------------------------------------------------
3、
/*
*
*/

package mvcTest;

/**
* 游戲的Model類,負責所有游戲相關數據及運行
* @author WangYu
* @version 1.0
* Description:
* </pre>
* Create on :Date :2005-6-13 Time:15:58:33
* LastModified:
* History:
*/
//SnakeModel.java
import javax.swing.*;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Observable;
import java.util.Random;

/**
* 游戲的Model類,負責所有游戲相關數據及運行
*/
class SnakeModel extends Observable implements Runnable {
boolean[][] matrix; // 指示位置上有沒蛇體或食物
LinkedList nodeArray = new LinkedList(); // 蛇體
Node food;
int maxX;
int maxY;
int direction = 2; // 蛇運行的方向
boolean running = false; // 運行狀態

int timeInterval = 200; // 時間間隔,毫秒
double speedChangeRate = 0.75; // 每次得速度變化率
boolean paused = false; // 暫停標志

int score = 0; // 得分
int countMove = 0; // 吃到食物前移動的次數

// UP and DOWN should be even
// RIGHT and LEFT should be odd
public static final int UP = 2;
public static final int DOWN = 4;
public static final int LEFT = 1;
public static final int RIGHT = 3;

public SnakeModel( int maxX, int maxY) {
this.maxX = maxX;
this.maxY = maxY;

reset();
}

public void reset(){
direction = SnakeModel.UP; // 蛇運行的方向
timeInterval = 200; // 時間間隔,毫秒
paused = false; // 暫停標志
score = 0; // 得分
countMove = 0; // 吃到食物前移動的次數

// initial matirx, 全部清0
matrix = new boolean[maxX][];
for (int i = 0; i < maxX; ++i) {
matrix[i] = new boolean[maxY];
Arrays.fill(matrix[i], false);
}

// initial the snake
// 初始化蛇體,如果橫向位置超過20個,長度為10,否則為橫向位置的一半
int initArrayLength = maxX > 20 ? 10 : maxX / 2;
nodeArray.clear();
for (int i = 0; i < initArrayLength; ++i) {
int x = maxX / 2 + i;//maxX被初始化為20
int y = maxY / 2; //maxY被初始化為30
//nodeArray[x,y]: [10,15]-[11,15]-[12,15]~~[20,15]
//默認的運行方向向上,所以游戲一開始nodeArray就變為:
// [10,14]-[10,15]-[11,15]-[12,15]~~[19,15]
nodeArray.addLast(new Node(x, y));
matrix[x][y] = true;
}

// 創建食物
food = createFood();
matrix[food.x][food.y] = true;
}

public void changeDirection(int newDirection) {
// 改變的方向不能與原來方向同向或反向
if (direction % 2 != newDirection % 2) {
direction = newDirection;
}
}

/**
* 運行一次
* @return
*/
public boolean moveOn() {
Node n = (Node) nodeArray.getFirst();
int x = n.x;
int y = n.y;

// 根據方向增減坐標值
switch (direction) {
case UP:
y--;
break;
case DOWN:
y++;
break;
case LEFT:
x--;
break;
case RIGHT:
x++;
break;
}

// 如果新坐標落在有效范圍內,則進行處理
if ((0 <= x && x < maxX) && (0 <= y && y < maxY)) {

if (matrix[x][y]) { // 如果新坐標的點上有東西(蛇體或者食物)
if (x == food.x && y == food.y) { // 吃到食物,成功
nodeArray.addFirst(food); // 從蛇頭贈長

// 分數規則,與移動改變方向的次數和速度兩個元素有關
int scoreGet = (10000 - 200 * countMove) / timeInterval;
score += scoreGet > 0 ? scoreGet : 10;
countMove = 0;

food = createFood(); // 創建新的食物
matrix[food.x][food.y] = true; // 設置食物所在位置
return true;
} else // 吃到蛇體自身,失敗
return false;

} else { // 如果新坐標的點上沒有東西(蛇體),移動蛇體
nodeArray.addFirst(new Node(x, y));
matrix[x][y] = true;
n = (Node) nodeArray.removeLast();
matrix[n.x][n.y] = false;
countMove++;
return true;
}
}
return false; // 觸到邊線,失敗
}

public void run() {
running = true;
while (running) {
try {
Thread.sleep(timeInterval);
} catch (Exception e) {
break;
}

if (!paused) {
if (moveOn()) {
setChanged(); // Model通知View數據已經更新
notifyObservers();
} else {
JOptionPane.showMessageDialog(null,
"you failed",
"Game Over",
JOptionPane.INFORMATION_MESSAGE);
break;
}
}
}
running = false;
}

private Node createFood() {
int x = 0;
int y = 0;
// 隨機獲取一個有效區域內的與蛇體和食物不重疊的位置
do {
Random r = new Random();
x = r.nextInt(maxX);
y = r.nextInt(maxY);
} while (matrix[x][y]);

return new Node(x, y);
}

public void speedUp() {
timeInterval *= speedChangeRate;
}

public void speedDown() {
timeInterval /= speedChangeRate;
}

public void changePauseState() {
paused = !paused;
}

public String toString() {
String result = "";
for (int i = 0; i < nodeArray.size(); ++i) {
Node n = (Node) nodeArray.get(i);
result += "[" + n.x + "," + n.y + "]";
}
return result;
}
}

class Node {
int x;
int y;

Node(int x, int y) {
this.x = x;
this.y = y;
}
}
------------------------------------------------------------
4、

package mvcTest;

//SnakeView.java
import javax.swing.*;
import java.awt.*;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Observable;
import java.util.Observer;

/**
* MVC模式中得Viewer,只負責對數據的顯示,而不用理會游戲的控制邏輯
*/
public class SnakeView implements Observer {
SnakeControl control = null;
SnakeModel model = null;

JFrame mainFrame;
Canvas paintCanvas;
JLabel labelScore;

public static final int canvasWidth = 200;
public static final int canvasHeight = 300;

public static final int nodeWidth = 10;
public static final int nodeHeight = 10;

public SnakeView(SnakeModel model, SnakeControl control) {
this.model = model;
this.control = control;

mainFrame = new JFrame("GreedSnake");

Container cp = mainFrame.getContentPane();

// 創建頂部的分數顯示
labelScore = new JLabel("Score:");
cp.add(labelScore, BorderLayout.NORTH);

// 創建中間的游戲顯示區域
paintCanvas = new Canvas();
paintCanvas.setSize(canvasWidth + 1, canvasHeight + 1);
paintCanvas.addKeyListener(control);
cp.add(paintCanvas, BorderLayout.CENTER);

// 創建底下的幫助欄
JPanel panelButtom = new JPanel();
panelButtom.setLayout(new BorderLayout());
JLabel labelHelp;
labelHelp = new JLabel("PageUp, PageDown for speed;", JLabel.CENTER);
panelButtom.add(labelHelp, BorderLayout.NORTH);
labelHelp = new JLabel("ENTER or R or S for start;", JLabel.CENTER);
panelButtom.add(labelHelp, BorderLayout.CENTER);
labelHelp = new JLabel("SPACE or P for pause", JLabel.CENTER);
panelButtom.add(labelHelp, BorderLayout.SOUTH);
cp.add(panelButtom, BorderLayout.SOUTH);

mainFrame.addKeyListener(control);
mainFrame.pack();
mainFrame.setResizable(false);
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
mainFrame.setVisible(true);
}

void repaint() {
Graphics g = paintCanvas.getGraphics();

//draw background
g.setColor(Color.WHITE);
g.fillRect(0, 0, canvasWidth, canvasHeight);

// draw the snake
g.setColor(Color.BLACK);
LinkedList na = model.nodeArray;
Iterator it = na.iterator();
while (it.hasNext()) {
Node n = (Node) it.next();
drawNode(g, n);
}

// draw the food
g.setColor(Color.RED);
Node n = model.food;
drawNode(g, n);

updateScore();
}

private void drawNode(Graphics g, Node n) {
g.fillRect(n.x * nodeWidth,
n.y * nodeHeight,
nodeWidth - 1,
nodeHeight - 1);
}

public void updateScore() {
String s = "Score: " + model.score;
labelScore.setText(s);
}

public void update(Observable o, Object arg) {
repaint();
}
}
希望採納

❼ C語言的貪吃蛇源代碼

#include <bits/stdc++.h>

#include <windows.h>
#include <conio.h>
using namespace std;
void gotoxy(int x,int y) {COORD pos={x,y}; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);}//游標定位
class Food {//食物類
private: int m_x; int m_y;
public:
void randfood() {//隨機產生一個食物
srand((int)time(NULL));//利用時間添加隨機數種子,需要ctime頭文件
L1:{m_x=rand()%(85)+2;//2~86
m_y=rand()%(25)+2;//2~26
if(m_x%2) goto L1;//如果食物的x坐標不是偶數則重新確定食物的坐標
gotoxy(m_x,m_y);//在確認好的位置輸出食物
cout << "★";}}
int getFoodm_x() {return m_x;}//返回食物的x坐標
int getFoodm_y() {return m_y;}};//返回食物的y坐標
class Snake {
private:
struct Snakecoor {int x; int y;};//定義一個蛇的坐標機構
vector<Snakecoor> snakecoor;//將坐標存入vector容器中
//判斷並改變前進方向的函數
void degdir(Snakecoor&nexthead) {//定義新的蛇頭變數
static char key='d';//靜態變數防止改變移動方向後重新改回來
if(_kbhit()) {
char temp=_getch();//定義一個臨時變數儲存鍵盤輸入的值
switch(temp) {//如果臨時變數的值為wasd中的一個,則賦值給key
default: break;//default是預設情況,只有任何條件都不匹配的情況下才會執行 必須寫在前面!不然蛇無法轉向
case'w': case'a': case's': case'd':
//如果temp的方向和key的方向不相反則賦值 因為兩次移動方向不能相反 將蛇設置為初始向右走
if(key=='w' && temp!='s' || key=='s' && temp!='w' || key=='a' && temp!='d' || key=='d' && temp!='a') key=temp;}}
switch (key) {//根據key的值來確定蛇的移動方向
case'd': nexthead.x=snakecoor.front().x+2; nexthead.y=snakecoor.front().y; break;
//新的蛇頭的頭部等於容器內第一個數據(舊蛇頭)x坐標+2 因為蛇頭占兩個坐標,移動一次加2
case'a': nexthead.x=snakecoor.front().x-2; nexthead.y=snakecoor.front().y; break;
case'w': nexthead.x=snakecoor.front().x; nexthead.y=snakecoor.front().y-1; break;
//因為控制台的x長度是y的一半,所以用兩個x做蛇頭,需要的坐標是二倍
case's': nexthead.x=snakecoor.front().x; nexthead.y=snakecoor.front().y+1;}}
//游戲結束時設計一個界面輸出「游戲結束」以及分數
void finmatt(const int score) {
system("cls"); gotoxy(40, 14);//清屏然後輸出
cout << "游戲結束"; gotoxy(40, 16);
cout << "得分:" << score; gotoxy(0, 26);
exit(0);}//exit為C++的退出函數 exit(0)表示程序正常退出,非0表示非正常退出
void finishgame(const int score) {//游戲結束
if(snakecoor[0].x>=88 || snakecoor[0].x<0 || snakecoor[0].y>=28 || snakecoor[0].y<0) finmatt(score);//撞牆
for(int i=1;i<snakecoor.size();i++) if(snakecoor[0].x==snakecoor[i].x && snakecoor[0].y==snakecoor[i].y) finmatt(score);}//撞到自身
public://構造初始化蛇的位置
Snake() { Snakecoor temp;//臨時結構變數用於創建蛇
for(int i=5;i>=0;i--) {//反向創建初始蛇身,初始蛇頭朝右
temp.x=16+(i<<1); temp.y=8;//偶數 在蛇頭左移生成蛇身
snakecoor.push_back(temp);}}//在蛇尾尾插入臨時變數
void move(Food&food, int& score) {//蛇運動的函數
Snakecoor nexthead;//新蛇頭變數
degdir(nexthead);//判斷和改變蛇前進的方向
snakecoor.insert(snakecoor.begin(), nexthead);//將蛇頭插入容器的頭部
gotoxy(0, 0); cout << "得分:" << score;//每次移動都在左上角刷新得分
gotoxy(0, 2); cout << "蛇的長度為:" << snakecoor.size();//長度用來測試
finishgame(score);//判斷游戲結束,輸出分數
//吃到食物蛇的變化
if(snakecoor[0].x==food.getFoodm_x() && snakecoor[0].y==food.getFoodm_y()) {//蛇頭與食物重合
gotoxy(snakecoor[0].x, snakecoor[0].y); cout << "●";//吃到食物時這次蛇沒有移動,所以蛇會卡頓一下
gotoxy(snakecoor[1].x, snakecoor[1].y); cout << "■";//重新輸出一下蛇頭和第一節蛇身讓蛇不卡頓
score++; food.randfood(); return;}//吃到食物得分+1,如果蛇頭坐標和食物坐標重合則重新產生一個食物並直接結束本次移動
for(int i=0;i<snakecoor.size();i++) {//遍歷容器,判斷食物與蛇身是否重合並輸出整條蛇
gotoxy(snakecoor[i].x, snakecoor[i].y);
if (!i) cout << "●"; else cout << "■";//頭部輸出圓形否則輸出方塊
if (snakecoor[i].x==food.getFoodm_x() && snakecoor[i].y==food.getFoodm_y())food.randfood();}//如果食物刷新到了蛇身上,則重新產生一個
gotoxy(snakecoor.back().x,snakecoor.back().y);cout << " ";snakecoor.pop_back();}};
//數據與畫面是分開,的在容器尾部的地方輸出空格 清除畫面上的蛇尾,刪除容器中最後一個數據 清除數據上的蛇尾
void HideCursor() {CONSOLE_CURSOR_INFO cursor_info={1,0};SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);}//隱藏游標
int main() {system("mode con cols=88 lines=28"); system("title 貪吃蛇"); HideCursor();//游標隱藏,設置控制台窗口大小、標題
int score=0; Food food; food.randfood(); Snake snake;//得分變數,食物對象,開局隨機產生一個食物,蛇對象
while(true) {snake.move(food, score);Sleep(150);}return 0;}//蛇移動,游戲速度

❽ 求大神給一份android studio的貪吃蛇游戲的源代碼

請問你的源代碼還在嗎?

熱點內容
php種子怎麼打開 發布:2024-11-15 06:07:01 瀏覽:345
密碼箱的密碼忘記了如何開鎖 發布:2024-11-15 06:04:41 瀏覽:955
安卓軟體和蘋果系統哪個好 發布:2024-11-15 05:48:32 瀏覽:283
pythonwhileelse 發布:2024-11-15 05:39:10 瀏覽:671
java文件流上傳文件 發布:2024-11-15 05:24:02 瀏覽:147
linux安裝so 發布:2024-11-15 05:22:29 瀏覽:581
九游版冒險王2適合安卓哪個版本 發布:2024-11-15 05:12:33 瀏覽:600
iphonexsmax怎麼連接伺服器 發布:2024-11-15 05:11:46 瀏覽:775
長江存儲校招 發布:2024-11-15 05:11:01 瀏覽:966
oraclesql函數大全 發布:2024-11-15 05:10:00 瀏覽:465