小游戲源碼
Ⅰ 求java小游戲源代碼
[最佳答案] 連連看java源代碼 import javax.swing.*; import java.awt.*; import java.awt.event.*; pu... int x0=0,y0=0,x=0,y=0,fristMsg=0,secondMsg=0,validateLV; //游戲按鈕的位...
Ⅱ 求小游戲網站源碼
源碼是什麼
Ⅲ 求小游戲源代碼
貓版超級瑪麗游戲しょぼんのアクションBGMcastle.mp3
.......................................
geon.mp3
.......................................field.mp3
.......................................puyo.mp3
.......................................star4.mp3
....................................desktop.ini
....................................loadg.cpp
....................................main.cpp
....................................main.h
....................................RESrock.png
.......................................rock2.png
.......................................haikei.png
.......................................item.png
.......................................omake.png
.......................................omake2.png
.......................................player.png
.......................................syobon3.png
....................................... eki.png
....................................SE4-clear.mp3
......................................allclear.mp3
......................................rockbreak.mp3
......................................rockcoin.mp3
......................................rockkinoko.mp3
......................................coin.mp3
......................................death.mp3
......................................dokan.mp3
......................................gameover.mp3
......................................goal.mp3
......................................hintblock.mp3
......................................humi.mp3
......................................jump.mp3
......................................jumpblock.mp3
......................................kirra.mp3
......................................koura.mp3
......................................powerup.mp3
......................................pswitch.mp3
...................................... ekifire.mp3
.....................................YSapploc.msi
.......................................AppLoc.tmp
....................................しょぼんのアクション.exe
....................................リードミー.txt
....................................點我開始玩.cmd
....................................BGM
....................................RES
....................................SE
....................................SYS
................しょぼんのアクション
http://www.pudn.com/downloads385/sourcecode/game/detail1652652.html
http://www.pudn.com/downloads234/sourcecode/game/detail1099372.html
http://syobon.codeplex.com/releases/62191/download/214890
變態版http://download.csdn.net/download/lc19890326/861250
VF
- 表單(scx/sct)可以用類瀏覽器的ViewClassCode功能得到包括所有屬性和代碼的prg格式文本
報表(frx/frt)無法導出成prg格式
菜單(mnx/mnt)編譯時已自動生成了prg格式的文件mpr
注意「文件類型」一定要選擇「窗體」類型,否則「查看代碼」將處於隱藏狀態,無法看到原代碼,切記!!
1:如果只是想獲得網站的樣式,使用瀏覽器的「保存」功能就可以實現!關鍵是下載到CSS文件就可以了!
2:找到對方使用的整站程序
Ⅳ vb小游戲源代碼
Rem 窗體創建三個單選框按鈕,Option1、Option2、Option3。
小游戲是一個較模糊的概念,它是相對於體積龐大的單機游戲及網路游戲而言的,泛指所有體積較小、玩法簡單的游戲,通常這類游戲以休閑益智類為主,有單機版有網頁版,在網頁上嵌入的多為FLASH格式。
當下小游戲主要是指在線玩的flash版本游戲,統稱小游戲,其實小游戲還包含單機游戲,小型游戲機等。一般游戲大小小於10m的游戲都統稱為小游戲,一些街機類小游戲。因其游戲安裝簡便,耐玩性強,無依賴性而廣受白領及小朋友的喜愛。
小游戲」這個詞的型含義其實很簡單,它不是一些大的游戲,不必花費更多的時間和精力。
小游戲是原始的游戲娛樂方式,小游戲本身是為了叫人們在工作,學習後的一種娛樂、休閑的一種方式,不是為了叫玩家為之花費金錢、花費精力,更不是叫玩家為他痴迷。
小游戲也可以理解為「Flash游戲」,是以SWF為後綴的游戲的總稱.這些游戲是通過Flash軟體和 Flash 編程語言 Flash ActionScript 製作而成。
由於Flash是矢量軟體,所以小游戲放大後幾乎不影響畫面效果。Flash小游戲是一種新興起的游戲形式,以游戲簡單,操作方便,綠色,無需安裝,文件體積小等優點漸漸被廣大網友喜愛。
Ⅳ 求在線小游戲游戲源碼
論壇的代碼是[flash]swf地址[/flash]
html代碼是
<object id="video" width="400" height="200" border="0" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">
<param name="ShowDisplay" value="0">
<param name="ShowControls" value="1">
<param name="AutoStart" value="1">
<param name="AutoRewind" value="0">
<param name="PlayCount" value="0">
<param name="Appearance value="0 value=""">
<param name="BorderStyle value="0 value=""">
<param name="MovieWindowHeight" value="240">
<param name="MovieWindowWidth" value="320">
<param name="FileName" value="/Mbar.avi">
<embed width="400" height="200" border="0" showdisplay="0" showcontrols="1" autostart="1" autorewind="0" playcount="0" moviewindowheight="240" moviewindowwidth="320" filename="/swf地址" src="swf地址">
</embed>
</object>
Ⅵ 用C++編寫的小游戲源代碼
五子棋的代碼:
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include <time.h>
using namespace std;
const int N=15; //15*15的棋盤
const char ChessBoardflag = ' '; //棋盤標志
const char flag1='o'; //玩家1或電腦的棋子標志
const char flag2='X'; //玩家2的棋子標志
typedef struct Coordinate //坐標類
{
int x; //代錶行
int y; //代表列
}Coordinate;
class GoBang //五子棋類
{
public:
GoBang() //初始化
{
InitChessBoard();
}
void Play() //下棋
{
Coordinate Pos1; // 玩家1或電腦
Coordinate Pos2; //玩家2
int n = 0;
while (1)
{
int mode = ChoiceMode();
while (1)
{
if (mode == 1) //電腦vs玩家
{
ComputerChess(Pos1,flag1); // 電腦下棋
if (GetVictory(Pos1, 0, flag1) == 1) //0表示電腦,真表示獲勝
break;
PlayChess(Pos2, 2, flag2); //玩家2下棋
if (GetVictory(Pos2, 2, flag2)) //2表示玩家2
break;
}
else //玩家1vs玩家2
{
PlayChess(Pos1, 1, flag1); // 玩家1下棋
if (GetVictory(Pos1, 1, flag1)) //1表示玩家1
break;
PlayChess(Pos2, 2, flag2); //玩家2下棋
if (GetVictory(Pos2, 2, flag2)) //2表示玩家2
break;
}
}
cout << "***再來一局***" << endl;
cout << "y or n :";
char c = 'y';
cin >> c;
if (c == 'n')
break;
}
}
protected:
int ChoiceMode() //選擇模式
{
int i = 0;
system("cls"); //系統調用,清屏
InitChessBoard(); //重新初始化棋盤
cout << "***0、退出 1、電腦vs玩家 2、玩家vs玩家***" << endl;
while (1)
{
cout << "請選擇:";
cin >> i;
if (i == 0) //選擇0退出
exit(1);
if (i == 1 || i == 2)
return i;
cout << "輸入不合法" << endl;
}
}
void InitChessBoard() //初始化棋盤
{
for (int i = 0; i < N + 1; ++i)
{
for (int j = 0; j < N + 1; ++j)
{
_ChessBoard[i][j] = ChessBoardflag;
}
}
}
void PrintChessBoard() //列印棋盤,這個函數可以自己調整
{
system("cls"); //系統調用,清空屏幕
for (int i = 0; i < N+1; ++i)
{
for (int j = 0; j < N+1; ++j)
{
if (i == 0) //列印列數字
{
if (j!=0)
printf("%d ", j);
else
printf(" ");
}
else if (j == 0) //列印行數字
printf("%2d ", i);
else
{
if (i < N+1)
{
printf("%c |",_ChessBoard[i][j]);
}
}
}
cout << endl;
cout << " ";
for (int m = 0; m < N; m++)
{
printf("--|");
}
cout << endl;
}
}
void PlayChess(Coordinate& pos, int player, int flag) //玩家下棋
{
PrintChessBoard(); //列印棋盤
while (1)
{
printf("玩家%d輸入坐標:", player);
cin >> pos.x >> pos.y;
if (JudgeValue(pos) == 1) //坐標合法
break;
cout << "坐標不合法,重新輸入" << endl;
}
_ChessBoard[pos.x][pos.y] = flag;
}
void ComputerChess(Coordinate& pos, char flag) //電腦下棋
{
PrintChessBoard(); //列印棋盤
int x = 0;
int y = 0;
while (1)
{
x = (rand() % N) + 1; //產生1~N的隨機數
srand((unsigned int) time(NULL));
y = (rand() % N) + 1; //產生1~N的隨機數
srand((unsigned int) time(NULL));
if (_ChessBoard[x][y] == ChessBoardflag) //如果這個位置是空的,也就是沒有棋子
break;
}
pos.x = x;
pos.y = y;
_ChessBoard[pos.x][pos.y] = flag;
}
int JudgeValue(const Coordinate& pos) //判斷輸入坐標是不是合法
{
if (pos.x > 0 && pos.x <= N&&pos.y > 0 && pos.y <= N)
{
if (_ChessBoard[pos.x][pos.y] == ChessBoardflag)
{
return 1; //合法
}
}
return 0; //非法
}
int JudgeVictory(Coordinate pos, char flag) //判斷有沒有人勝負(底層判斷)
{
int begin = 0;
int end = 0;
int begin1 = 0;
int end1 = 0;
//判斷行是否滿足條件
(pos.y - 4) > 0 ? begin = (pos.y - 4) : begin = 1;
(pos.y + 4) >N ? end = N : end = (pos.y + 4);
for (int i = pos.x, j = begin; j + 4 <= end; j++)
{
if (_ChessBoard[i][j] == flag&&_ChessBoard[i][j + 1] == flag&&
_ChessBoard[i][j + 2] == flag&&_ChessBoard[i][j + 3] == flag&&
_ChessBoard[i][j + 4] == flag)
return 1;
}
//判斷列是否滿足條件
(pos.x - 4) > 0 ? begin = (pos.x - 4) : begin = 1;
(pos.x + 4) > N ? end = N : end = (pos.x + 4);
for (int j = pos.y, i = begin; i + 4 <= end; i++)
{
if (_ChessBoard[i][j] == flag&&_ChessBoard[i + 1][j] == flag&&
_ChessBoard[i + 2][j] == flag&&_ChessBoard[i + 3][j] == flag&&
_ChessBoard[i + 4][j] == flag)
return 1;
}
int len = 0;
//判斷主對角線是否滿足條件
pos.x > pos.y ? len = pos.y - 1 : len = pos.x - 1;
if (len > 4)
len = 4;
begin = pos.x - len; //橫坐標的起始位置
begin1 = pos.y - len; //縱坐標的起始位置
pos.x > pos.y ? len = (N - pos.x) : len = (N - pos.y);
if (len>4)
len = 4;
end = pos.x + len; //橫坐標的結束位置
end1 = pos.y + len; //縱坐標的結束位置
for (int i = begin, j = begin1; (i + 4 <= end) && (j + 4 <= end1); ++i, ++j)
{
if (_ChessBoard[i][j] == flag&&_ChessBoard[i + 1][j + 1] == flag&&
_ChessBoard[i + 2][j + 2] == flag&&_ChessBoard[i + 3][j + 3] == flag&&
_ChessBoard[i + 4][j + 4] == flag)
return 1;
}
//判斷副對角線是否滿足條件
(pos.x - 1) >(N - pos.y) ? len = (N - pos.y) : len = pos.x - 1;
if (len > 4)
len = 4;
begin = pos.x - len; //橫坐標的起始位置
begin1 = pos.y + len; //縱坐標的起始位置
(N - pos.x) > (pos.y - 1) ? len = (pos.y - 1) : len = (N - pos.x);
if (len>4)
len = 4;
end = pos.x + len; //橫坐標的結束位置
end1 = pos.y - len; //縱坐標的結束位置
for (int i = begin, j = begin1; (i + 4 <= end) && (j - 4 >= end1); ++i, --j)
{
if (_ChessBoard[i][j] == flag&&_ChessBoard[i + 1][j - 1] == flag&&
_ChessBoard[i + 2][j - 2] == flag&&_ChessBoard[i + 3][j - 3] == flag&&
_ChessBoard[i + 4][j - 4] == flag)
return 1;
}
for (int i = 1; i < N + 1; ++i) //棋盤有沒有下滿
{
for (int j =1; j < N + 1; ++j)
{
if (_ChessBoard[i][j] == ChessBoardflag)
return 0; //0表示棋盤沒滿
}
}
return -1; //和棋
}
bool GetVictory(Coordinate& pos, int player, int flag) //對JudgeVictory的一層封裝,得到具體那個玩家獲勝
{
int n = JudgeVictory(pos, flag); //判斷有沒有人獲勝
if (n != 0) //有人獲勝,0表示沒有人獲勝
{
PrintChessBoard();
if (n == 1) //有玩家贏棋
{
if (player == 0) //0表示電腦獲勝,1表示玩家1,2表示玩家2
printf("***電腦獲勝*** ");
else
printf("***恭喜玩家%d獲勝*** ", player);
}
else
printf("***雙方和棋*** ");
return true; //已經有人獲勝
}
return false; //沒有人獲勝
}
private:
char _ChessBoard[N+1][N+1];
};
(6)小游戲源碼擴展閱讀:
設計思路
1、進行問題分析與設計,計劃實現的功能為,開局選擇人機或雙人對戰,確定之後比賽開始。
2、比賽結束後初始化棋盤,詢問是否繼續比賽或退出,後續可加入復盤、悔棋等功能。
3、整個過程中,涉及到了棋子和棋盤兩種對象,同時要加上人機對弈時的AI對象,即涉及到三個對象。
Ⅶ 急需基於eclipse的JAVA小游戲源代碼!!!
單人版五子棋,不用導入,直接新建一個mywindow類就行,然後把一下代碼粘貼就Ok了。或者,直接用dos就可以了。。
---------------------
import
java.awt.*;
import
java.awt.event.*;
import
javax.swing.*;
class
mypanel
extends
Panel
implements
MouseListener
{
int
chess[][]
=
new
int[11][11];
boolean
Is_Black_True;
mypanel()
{
Is_Black_True
=
true;
for(int
i
=
0;i
<
11;i++)
{
for(int
j
=
0;j
<
11;j++)
{
chess[i][j]
=
0;
}
}
addMouseListener(this);
setBackground(Color.BLUE);
setBounds(0,
0,
360,
360);
setVisible(true);
}
public
void
mousePressed(MouseEvent
e)
{
int
x
=
e.getX();
int
y
=
e.getY();
if(x
<
25
||
x
>
330
+
25
||y
<
25
||
y
>
330+25)
{
return;
}
if(chess[x/30-1][y/30-1]
!=
0)
{
return;
}
if(Is_Black_True
==
true)
{
chess[x/30-1][y/30-1]
=
1;
Is_Black_True
=
false;
repaint();
Justisewiner();
return;
}
if(Is_Black_True
==
false)
{
chess[x/30-1][y/30-1]
=
2;
Is_Black_True
=
true;
repaint();
Justisewiner();
return;
}
}
void
Drawline(Graphics
g)
{
for(int
i
=
30;i
<=
330;i
+=
30)
{
for(int
j
=
30;j
<=
330;
j+=
30)
{
g.setColor(Color.WHITE);
g.drawLine(i,
j,
i,
330);
}
}
for(int
j
=
30;j
<=
330;j
+=
30)
{
g.setColor(Color.WHITE);
g.drawLine(30,
j,
330,
j);
}
}
void
Drawchess(Graphics
g)
{
for(int
i
=
0;i
<
11;i++)
{
for(int
j
=
0;j
<
11;j++)
{
if(chess[i][j]
==
1)
{
g.setColor(Color.BLACK);
g.fillOval((i
+
1)
*
30
-
8,
(j
+
1)
*
30
-
8,
16,
16);
}
if(chess[i][j]
==
2)
{
g.setColor(Color.WHITE);
g.fillOval((i
+
1)
*
30
-
8,
(j
+
1)
*
30
-
8,
16,
16);
}
}
}
}
void
Justisewiner()
{
int
black_count
=
0;
int
white_count
=
0;
int
i
=
0;
for(i
=
0;i
<
11;i++)//橫向判斷
{
for(int
j
=
0;j
<
11;j++)
{
if(chess[i][j]
==
1)
{
black_count++;
if(black_count
==
5)
{
JOptionPane.showMessageDialog(this,
"黑棋勝利");
Clear_Chess();
return;
}
}
else
{
black_count
=
0;
}
if(chess[i][j]
==
2)
{
white_count++;
if(white_count
==
5)
{
JOptionPane.showMessageDialog(this,
"白棋勝利");
Clear_Chess();
return;
}
}
else
{
white_count
=
0;
}
}
}
for(i
=
0;i
<
11;i++)//豎向判斷
{
for(int
j
=
0;j
<
11;j++)
{
if(chess[j][i]
==
1)
{
black_count++;
if(black_count
==
5)
{
JOptionPane.showMessageDialog(this,
"黑棋勝利");
Clear_Chess();
return;
}
}
else
{
black_count
=
0;
}
if(chess[j][i]
==
2)
{
white_count++;
if(white_count
==
5)
{
JOptionPane.showMessageDialog(this,
"白棋勝利");
Clear_Chess();
return;
}
}
else
{
white_count
=
0;
}
}
}
for(i
=
0;i
<
7;i++)//左向右斜判斷
{
for(int
j
=
0;j
<
7;j++)
{
for(int
k
=
0;k
<
5;k++)
{
if(chess[i
+
k][j
+
k]
==
1)
{
black_count++;
if(black_count
==
5)
{
JOptionPane.showMessageDialog(this,
"黑棋勝利");
Clear_Chess();
return;
}
}
else
{
black_count
=
0;
}
if(chess[i
+
k][j
+
k]
==
2)
{
white_count++;
if(white_count
==
5)
{
JOptionPane.showMessageDialog(this,
"白棋勝利");
Clear_Chess();
return;
}
}
else
{
white_count
=
0;
}
}
}
}
for(i
=
4;i
<
11;i++)//右向左斜判斷
{
for(int
j
=
6;j
>=
0;j--)
{
for(int
k
=
0;k
<
5;k++)
{
if(chess[i
-
k][j
+
k]
==
1)
{
black_count++;
if(black_count
==
5)
{
JOptionPane.showMessageDialog(this,
"黑棋勝利");
Clear_Chess();
return;
}
}
else
{
black_count
=
0;
}
if(chess[i
-
k][j
+
k]
==
2)
{
white_count++;
if(white_count
==
5)
{
JOptionPane.showMessageDialog(this,
"白棋勝利");
Clear_Chess();
return;
}
}
else
{
white_count
=
0;
}
}
}
}
}
void
Clear_Chess()
{
for(int
i=0;i<11;i++)
{
for(int
j=0;j<11;j++)
{
chess[i][j]=0;
}
}
repaint();
}
public
void
paint(Graphics
g)
{
Drawline(g);
Drawchess(g);
}
public
void
mouseExited(MouseEvent
e){}
public
void
mouseEntered(MouseEvent
e){}
public
void
mouseReleased(MouseEvent
e){}
public
void
mouseClicked(MouseEvent
e){}
}
class
myframe
extends
Frame
implements
WindowListener
{
mypanel
panel;
myframe()
{
setLayout(null);
panel
=
new
mypanel();
add(panel);
panel.setBounds(0,23,
360,
360);
setTitle("單人版五子棋");
setBounds(200,
200,
360,
383);
setVisible(true);
addWindowListener(this);
}
public
void
windowClosing(WindowEvent
e)
{
System.exit(0);
}
public
void
windowDeactivated(WindowEvent
e){}
public
void
windowActivated(WindowEvent
e){}
public
void
windowOpened(WindowEvent
e){}
public
void
windowClosed(WindowEvent
e){}
public
void
windowIconified(WindowEvent
e){}
public
void
windowDeiconified(WindowEvent
e){}
}
public
class
mywindow
{
public
static
void
main(String
argc
[])
{
myframe
f
=
new
myframe();
}
}
Ⅷ windos 小游戲源碼
相關搜索 windows小游戲 windows自帶小游戲 windows小游戲下載 windows xp 小游戲 小游戲源碼
flash小游戲源碼 小游戲網站源碼 windows 源碼 小游戲 系統 攻略系統
Ⅸ 求linux小游戲源代碼
到linux c編程論壇里都可以找到