(保存时窗体文件名设置为“21 取学号中间4位frm”,工程文件名设置为“21 取学号中间4位vbp”)
这个要求你就自己写吧! 我只能给你上面的代码
数学方法 ,也就把上面的 200912345678 当成一个数
Dim val1 As Double
val1 = 200912345678#
val1 = Int(val1 / 10000) Mod 10000
msgbox val1
字符处理方法
msgbox mid("200912345678",5,4)
你要啥类型的啊。。
下面这个行不行啊?是一个完整的程序 在窗口上画了一个石英钟
using System;
using SystemReflection;
using SystemWindowsForms;
using SystemRuntimeInteropServices;
using LPCTSTR = SystemString;
using ATOM = SystemUInt16;
using WORD = SystemUInt16;
using BYTE = SystemUInt16;
using DWORD = SystemUInt32;
using WPARAM = SystemUInt32;
using UINT = SystemUInt32;
using LRESULT = SystemInt32;
using LPARAM = SystemInt32;
using LPVOID = SystemInt32;
using HRESULT = SystemInt32;
using BOOL = SystemInt32;
using LPSIZE = SystemInt32;
using LPPOINT = SystemInt32;
using HWND = SystemIntPtr;
using HINSTANCE = SystemIntPtr;
using HICON = SystemIntPtr;
using HCURSOR = SystemIntPtr;
using HBRUSH = SystemIntPtr;
using HMENU = SystemIntPtr;
using HDC = SystemIntPtr;
using HGDIOBJ = SystemIntPtr;
namespace AnalogClock
{
class Program
{
static Int32 Main(String[] args)
{
ConsoleTitle = "Analog Clock";
ShowWindow(FindWindow(null, ConsoleTitle), SW_HIDE);
hInst = MarshalGetHINSTANCE(AssemblyGetExecutingAssembly()GetModules()[0]);
MSG msg;
WindowRegister(hInst);
if (1 > InitInstance(hInst, SW_SHOW)) return 0;
while (0 != GetMessage(out msg, HWNDZero, 0, 0))
{
TranslateMessage(out msg);
DispatchMessage(out msg);
}
return (Int32)msgwParam;
}
private static ATOM WindowRegister(HINSTANCE hInstance)
{
WndMainProc = new WNDPROC(WndProc);
WNDCLASSEX wnd;
wndcbClsExtra = 0;
wndcbSize = (UInt32)MarshalSizeOf(typeof(WNDCLASSEX));
wndcbWndExtra = 0;
wndhbrBackground = hbrWhite;
wndhCursor = CursorsArrowHandle;
wndhIcon = ResourceAppHandle;
wndhIconSm = ResourceAppHandle;
wndhInstance = hInstance;
wndlpfnWndProc = WndMainProc;
wndlpszClassName = "AnalogClock";
wndlpszMenuName = null;
wndstyle = CS_HREDRAW | CS_VREDRAW;
return RegisterClassEx(ref wnd);
}
private static BOOL InitInstance(HINSTANCE hInstance, UInt32 nCmdShow)
{
Int32 xScreen = (GetSystemMetrics(SM_CXSCREEN) - 300) >> 1;
Int32 yScreen = (GetSystemMetrics(SM_CYSCREEN) - 300) >> 1;
HWND hWndMain = CreateWindowEx(WS_EX_TOPMOST, "AnalogClock", "Analog Clock",
WS_OVERLAPPEDWINDOW,
xScreen, yScreen, 300, 300, HWNDZero, HWNDZero, hInstance, 0);
if (HWNDZero == hWndMain) return FALSE;
ShowWindow(hWndMain, nCmdShow);
UpdateWindow(hWndMain);
return TRUE;
}
private static LRESULT WndProc(HWND hWnd, UInt32 uMsg, WPARAM wParam, LPARAM lParam)
{
BOOL fChange;
HDC hdc;
PAINTSTRUCT ps;
SYSTEMTIME st;
switch (uMsg)
{
case WM_CREATE:
SetTimer(hWnd, ID_TIMER, 10, null);
GetLocalTime(out st);
stPrevious = st;
break;
case WM_SIZE:
cxClient = LOWORD(lParam); cyClient = HIWORD(lParam);
break;
case WM_TIMER:
GetLocalTime(out st);
fChange = stwHour != stPreviouswHour ||
stwMinute != stPreviouswMinute ||
stwSecond != stPreviouswSecond TRUE : FALSE;
hdc = GetDC(hWnd);
SetIsotropic(hdc);
SelectObject(hdc, hpnWhite);
DrawHands(hdc, ref stPrevious, fChange);
SelectObject(hdc, hpnBlack);
DrawHands(hdc, ref st, TRUE);
ReleaseDC(hWnd, hdc);
stPrevious = st;
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, out ps);
SetIsotropic(hdc);
DrawClock(hdc);
DrawHands(hdc, ref stPrevious, TRUE);
EndPaint(hWnd, out ps);
break;
case WM_DESTROY:
KillTimer(hWnd, ID_TIMER);
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
return 0;
}
private static void SetIsotropic(HDC hdc)
{
SetMapMode(hdc, (Int32)MM_ISOTROPIC);
SetWindowExtEx(hdc, 1000, 1000, 0);
SetViewportExtEx(hdc, cxClient >> 1, -cyClient >> 1, 0);
SetViewportOrgEx(hdc, cxClient >> 1, cyClient >> 1, 0);
}
private static void RotatePoint(POINT[] pt, Int32 iNum, Int32 iAngle)
{
Int32 i;
POINT ptTemp;
for (i = 0; i < iNum; i++)
{
ptTempx = (Int32)(pt[i]x MathCos(TWOPI iAngle / 3600) +
pt[i]y MathSin(TWOPI iAngle / 3600));
ptTempy = (Int32)(pt[i]y MathCos(TWOPI iAngle / 3600) -
pt[i]x MathSin(TWOPI iAngle / 3600));
pt[i]x = ptTempx; pt[i]y = ptTempy;
}
}
private static void DrawClock(HDC hdc)
{
Int32 iAngle;
POINT[] pt = new POINT[3];
for (iAngle = 0; iAngle < 360; iAngle += 6)
{
pt[0]x = 0; pt[0]y = 900;
RotatePoint(pt, 1, iAngle);
pt[2]x = 0 < iAngle % 5 33 : 100; pt[2]y = pt[2]x;
pt[0]x -= pt[2]x >> 1; pt[0]y -= pt[2]y >> 1;
pt[1]x = pt[0]x + pt[2]x; pt[1]y = pt[0]y + pt[2]y;
SelectObject(hdc, hbrBlack);
Ellipse(hdc, pt[0]x, pt[0]y, pt[1]x, pt[1]y);
}
}
private static void DrawHands(HDC hdc, ref SYSTEMTIME pst, BOOL fChange)
{
Int32 i;
Int32[] iAngle = new Int32[4] {
(Int32)(3600 pstwHour / 120 + 300 pstwMinute / 600),
(Int32)(3600 pstwMinute / 600 + 60 pstwSecond / 60),
(Int32)(3600 pstwSecond / 600 + 60 pstwMilliseconds / 1000), 0 };
POINT[,] pt = new POINT[4, 5];
iAngle[3] = iAngle[2];
pt[0, 0]x = 0; pt[0, 0]y = -150;
pt[0, 1]x = 100; pt[0, 1]y = 0;
pt[0, 2]x = 0; pt[0, 2]y = 600;
pt[0, 3]x = -100; pt[0, 3]y = 0;
pt[0, 4]x = 0; pt[0, 4]y = -150;
pt[1, 0]x = 0; pt[1, 0]y = -200;
pt[1, 1]x = 50; pt[1, 1]y = 0;
pt[1, 2]x = 0; pt[1, 2]y = 800;
pt[1, 3]x = -50; pt[1, 3]y = 0;
pt[1, 4]x = 0; pt[1, 4]y = -200;
pt[2, 0]x = 0; pt[2, 0]y = -150;
pt[2, 1]x = 0; pt[2, 1]y = 0;
pt[2, 2]x = 0; pt[2, 2]y = 0;
pt[2, 3]x = 0; pt[2, 3]y = 0;
pt[2, 4]x = 0; pt[2, 4]y = 800;
pt[3, 0]x = -10; pt[3, 0]y = 0;
pt[3, 1]x = 0; pt[3, 1]y = -10;
pt[3, 2]x = 10; pt[3, 2]y = 0;
pt[3, 3]x = 0; pt[3, 3]y = 10;
pt[3, 4]x = -10; pt[3, 4]y = 0;
for (i = 0 < fChange 0 : 2; i < 4; i++)
{
POINT[] ptTmp = new POINT[5];
ptTmp[0] = pt[i, 0]; ptTmp[1] = pt[i, 1];
ptTmp[2] = pt[i, 2]; ptTmp[3] = pt[i, 3];
ptTmp[4] = pt[i, 4];
RotatePoint(ptTmp, 5, iAngle[i]);
Polyline(hdc, ptTmp, 5);
}
}
private static Int32 LOWORD(Int32 i) { return i & 0xFFFF; }
private static Int32 HIWORD(Int32 i) { return i >> 0x10; }
private static Int32 cxClient, cyClient;
private static HINSTANCE hInst;
private static SYSTEMTIME stPrevious;
private static WNDPROC WndMainProc;
private const UINT ID_TIMER = 1;
private const Double TWOPI = 2 MathPI;
private static HBRUSH hbrBlack = GetStockObject(BLACK_BRUSH);
private static HBRUSH hbrWhite = GetStockObject(WHITE_BRUSH);
private static HBRUSH hpnBlack = GetStockObject(BLACK_PEN);
private static HBRUSH hpnWhite = GetStockObject(WHITE_PEN);
private const Int32 TRUE = 1, FALSE = 0;
private const UINT
WS_OVERLAPPED = 0x00000000, WS_BORDER = 0x00800000, WS_DLGFRAME = 0x00400000,
WS_SYSMENU = 0x00080000, WS_THICKFRAME = 0x00040000, WS_MINIMIZEBOX = 0x00020000,
WS_MAXIMIZEBOX = 0x00010000, WS_CAPTION = WS_BORDER | WS_DLGFRAME,
WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX,
WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW;
private const UINT WM_CREATE = 0x0001, WM_DESTROY = 0x0002,
WM_SIZE = 0x0005, WM_PAINT = 0x000F, WM_TIMER = 0x0113;
private const UINT WS_EX_TOPMOST = 0x00000008;
private const UINT CS_VREDRAW = 0x0001, CS_HREDRAW = 0x0002;
private const UINT SW_HIDE = 0, SW_SHOW = 5;
private const UINT MM_ISOTROPIC = 7;
private const Int32 SM_CXSCREEN = 0, SM_CYSCREEN = 1;
private const Int32 WHITE_BRUSH = 0, BLACK_BRUSH = 4, WHITE_PEN = 6, BLACK_PEN = 7;
[StructLayout(LayoutKindSequential)]
private struct MSG
{
public HWND hwnd;
public UINT message;
public UINT wParam;
public LPARAM lParam;
public UINT time;
public POINT pt;
}
[StructLayout(LayoutKindSequential)]
private struct WNDCLASSEX
{
public UInt32 cbSize;
public UInt32 style;
public WNDPROC lpfnWndProc;
public Int32 cbClsExtra;
public Int32 cbWndExtra;
public HINSTANCE hInstance;
public HICON hIcon;
public HCURSOR hCursor;
public HBRUSH hbrBackground;
public String lpszMenuName;
public String lpszClassName;
public HICON hIconSm;
}
[StructLayout(LayoutKindSequential)]
private struct SYSTEMTIME
{
public WORD wYear;
public WORD wMonth;
public WORD wDayOfWeek;
public WORD wDay;
public WORD wHour;
public WORD wMinute;
public WORD wSecond;
public WORD wMilliseconds;
}
[StructLayout(LayoutKindSequential)]
private struct PAINTSTRUCT
{
public HDC hdc;
public BOOL fErase;
public RECT rcPaint;
public BOOL fRestore;
public BOOL fIncUpdate;
[MarshalAs(UnmanagedTypeByValArray, SizeConst = 32)]
public BYTE[] rgbReserved;
}
[StructLayout(LayoutKindSequential)]
private struct RECT
{
public Int32 left;
public Int32 top;
public Int32 right;
public Int32 bottom;
}
[StructLayout(LayoutKindSequential)]
private struct POINT
{
public Int32 x;
public Int32 y;
}
[StructLayout(LayoutKindSequential)]
private struct SIZE
{
public Int32 cx;
public Int32 cy;
}
private delegate Int32 WNDPROC(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
private delegate void TIMERPROC(IntPtr hwnd, UINT uMsg, UINT idEvent, UINT dwTime);
[DllImport("user32dll")]
private static extern BOOL GetMessage(
out MSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax);
[DllImport("user32dll")]
private static extern BOOL TranslateMessage(out MSG lpMsg);
[DllImport("user32dll")]
private static extern Int32 DispatchMessage(out MSG lpMsg);
[DllImport("user32dll")]
private static extern ATOM RegisterClassEx(ref WNDCLASSEX lpwcx);
[DllImport("user32dll")]
private static extern BOOL ShowWindow(HWND hWnd, UInt32 nCmdShow);
[DllImport("user32dll")]
private static extern BOOL UpdateWindow(HWND hWnd);
[DllImport("user32dll")]
private static extern HWND CreateWindowEx(
DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName,
DWORD dwStyle, Int32 x, Int32 y, Int32 nWidth, Int32 nHeight,
HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam);
[DllImport("user32dll")]
private static extern LRESULT DefWindowProc(HWND hWnd, UInt32 Msg, WPARAM wParam, LPARAM lParam);
[DllImport("user32dll")]
private static extern Int32 GetSystemMetrics(Int32 nIndex);
[DllImport("user32dll")]
private static extern UInt32 SetTimer(HWND hwnd, UINT idTimer, UINT uTimeout, TIMERPROC tmprc);
[DllImport("user32dll")]
private static extern BOOL KillTimer(HWND hwnd, UINT uIDEvent);
[DllImport("user32dll")]
private static extern HDC GetDC(HWND hWnd);
[DllImport("user32dll")]
private static extern HRESULT ReleaseDC(HWND hWnd, HDC hDC);
[DllImport("user32dll")]
private static extern HDC BeginPaint(HWND hwnd, out PAINTSTRUCT lpPaint);
[DllImport("user32dll")]
private static extern BOOL EndPaint(HWND hwnd, out PAINTSTRUCT lpPaint);
[DllImport("user32dll")]
private static extern void PostQuitMessage(Int32 nExitCode);
[DllImport("user32dll")]
private static extern HWND FindWindow(LPCTSTR lpClassName, LPCTSTR lpWindowName);
[DllImport("gdi32dll")]
private static extern HGDIOBJ GetStockObject(Int32 fnObject);
[DllImport("gdi32dll")]
private static extern Int32 SetMapMode(HDC hdc, Int32 fnMapMode);
[DllImport("gdi32dll")]
private static extern BOOL SetWindowExtEx(HDC hdc, Int32 nXExtent, Int32 nYExtent, LPSIZE lpSize);
[DllImport("gdi32dll")]
private static extern BOOL SetViewportExtEx(HDC hdc, Int32 nXExtent, Int32 nYExtent, LPSIZE lpSize);
[DllImport("gdi32dll")]
private static extern BOOL SetViewportOrgEx(HDC hdc, Int32 X, Int32 Y, LPPOINT lpPoint);
[DllImport("gdi32dll")]
private static extern HGDIOBJ SelectObject(HDC hdc, HGDIOBJ hgdiobj);
[DllImport("gdi32dll")]
private static extern BOOL DeleteObject(HGDIOBJ hObject);
[DllImport("gdi32dll")]
private static extern BOOL Ellipse(
HDC hdc, Int32 nLeftRect, Int32 nTopRect, Int32 nRightRect, Int32 nBottomRect);
[DllImport("gdi32dll")]
private static extern BOOL Polyline(HDC hdc, POINT[] lppt, Int32 cPoints);
[DllImport("kernel32dll")]
private static extern void GetLocalTime(out SYSTEMTIME lpSystemTime);
}
}
<Style Type="Text/CSS">
<!--
Input{}
blokje{
Height:48px;
Width:48px;
Font-Size:16pt;
Font-Weight:900;
Font-Family:Comic Sans MS,Arial,Verdana;
Text-Align:Center;
}
knopje{
Width:144px;
}
-->
</Style>
<Center>
<Form>
<Input Type="Button" title="Click here to play again" Name="beurten" Width="164px" Class="knopje" Value="Player 1" onClick="wie = 'Player 1'; initieer()">
<Table CellPadding="0" CellSpacing="0" Border="0">
<Script Language="JavaScript">
<!--//
for (i = 1; i < 10; i++) {
if (i % 3 == 1) {documentwrite('<Tr>');}
documentwrite('<Td><Input Type="Button" Name="' + i + '" Value=" " Class="blokje" onClick="wijzig(thisform,this)"></Td>');
if (i % 3 == 0) {documentwrite('</Tr>');}
}
//-->
</Script>
</Table>
<Input Type="CheckBox" title="Click here to change from 2 players or computergame" Name="automaat" Value="2 players" Id="autmat" onClick="if (thisvalue == 'Computer') {thisvalue = '2 players'; auto = 0} else {thisvalue = 'Computer'; auto = 1}; wie = 'Player 1'; initieer();"><Label For="autmat">与电脑对玩?</Label>
<Table CellPadding="0" CellSpacing="0" Border="1">
<Tr BgColor="Silver">
<Td Align="Center"> 玩家 1 胜</Td>
<Td Align="Center"> 玩家 2 胜</Td>
<Td Align="Center"> 平局 </Td>
</Tr>
<Tr BgColor="Silver">
<Td Align="Center"><Input Style="BackGround-Color:Transparent;Border:Solid 0px;Text-Align:Center" Type="Text" Size="3" ReadOnly title="Player 1" Name="speler1" Value="0"></Td>
<Td Align="Center"><Input Style="BackGround-Color:Transparent;Border:Solid 0px;Text-Align:Center" Type="Text" Size="3" ReadOnly title="Player 2" Name="speler2" Value="0"></Td>
<Td Align="Center"><Input Style="BackGround-Color:Transparent;Border:Solid 0px;Text-Align:Center" Type="Text" Size="3" ReadOnly title="Remise" Name="remise" Value="0"></Td>
</Tr>
</Table>
</Form>
</Center>
<Script Language="JavaScript">
<!--//
timerID = xtal = ytal = ztal = auto = 0;
wie = 'Player 1';
function initieer(){
clearTimeout(timerID);
cel = new Array(0,0,0,0,0,0,0,0,0,0);
aanv = new Array(); strat = verd = leeg = aanv;
beurt = wissel = 1; wint = keren = 0;
documentforms[0]speler1value = xtal;
documentforms[0]speler2value = ytal;
documentforms[0]remisevalue = ztal;
if (wie != 'Start') {
for (i in cel) {
cel[i] = 0; if (i > 0) {documentforms[0]elements[i]value = ''};
}
}
documentforms[0]beurtenvalue = wie;
}
function zetten() {
clearTimeout(timerID);
if (aanv[0] > 0) {
slag = aanv[Mathfloor(Mathrandom() 10) % aanvlength]
} else if (verd[0] > 0) {
slag = verd[Mathfloor(Mathrandom() 10) % verdlength];
} else if (strat[0] > 0) {
slag = strat[Mathfloor(Mathrandom() 10) % stratlength];
} else {
slag = leeg[Mathfloor(Mathrandom() 10) % leeglength];
}
if (beurt == 0 && slag > 0) {documentforms[0]elements[slag]click()};
}
function win() {
if ( cel[1] + cel[2] + cel[3] == 3 ||
cel[4] + cel[5] + cel[6] == 3 ||
cel[7] + cel[8] + cel[9] == 3 ||
cel[1] + cel[4] + cel[7] == 3 ||
cel[2] + cel[5] + cel[8] == 3 ||
cel[3] + cel[6] + cel[9] == 3 ||
cel[1] + cel[5] + cel[9] == 3 ||
cel[3] + cel[5] + cel[7] == 3
) {
if (confirm("玩家一: 你赢了一局 !!\n还想要继续玩吗"))
{
wint = 1;
xtal++; wie = 'Player 1'; timerID = setTimeout('initieer()',800)
} else {
xtal++; wie = 'Start'; timerID = setTimeout('initieer()',800)
};
}
if ( cel[1] + cel[2] + cel[3] == 30 ||
cel[4] + cel[5] + cel[6] == 30 ||
cel[7] + cel[8] + cel[9] == 30 ||
cel[1] + cel[4] + cel[7] == 30 ||
cel[2] + cel[5] + cel[8] == 30 ||
cel[3] + cel[6] + cel[9] == 30 ||
cel[1] + cel[5] + cel[9] == 30 ||
cel[3] + cel[5] + cel[7] == 30
) {
if (confirm(((auto == 1) ('电脑赢啦!!!') : ('玩家二: 你赢了一局 !!')) + "!\n还想要继续玩吗")) {
ytal++; wie = 'Player 1'; timerID = setTimeout('initieer()',800)
} else {
ytal++; wie = 'Start'; timerID = setTimeout('initieer()',800)
};
}
}
function wisselen(beurt){
if (wissel == 1) {
if (beurt == 0) {
beurt = 1;
wie = "Player " + 1
}
else {
if (auto == 0) {beurt = 0;
wie = "Player " + 2} else {beurt = 0; wie = "Computer";}
}
if (keren == 9
) {
if (confirm("打平了!!!\n\n还想要继续玩吗")) {
ztal++; wie = 'Player 1'; timerID = setTimeout('initieer()',800)} else
{ztal++; wie = 'Start'; timerID = setTimeout('initieer()',800)};
}
}
else {
beurt = beurt;
}
wissel = 1;
return(beurt);
}
function wijziging(klik) {
plek = cel[klik]; geklikt = klik;
if (plek == 0){
if (beurt == 0){
xo = "O";
plek = 10;
} else {
xo = "X";
plek = 1;
}
cel[klik] = plek; keren++;
}
else {
if (plek == 10){
xo = "O";}
if (plek == 1){
xo = "X";}
wissel = 0
}
return(xo);
}
function verdedig() {leeg = new Array(); verd = new Array();
for (i = 1; i < 10; i++) { oud = cel[i]; cel[i] = 1;
if ( (cel[1] + cel[2] + cel[3] == 3 ||
cel[4] + cel[5] + cel[6] == 3 ||
cel[7] + cel[8] + cel[9] == 3 ||
cel[1] + cel[4] + cel[7] == 3 ||
cel[2] + cel[5] + cel[8] == 3 ||
cel[3] + cel[6] + cel[9] == 3 ||
cel[1] + cel[5] + cel[9] == 3 ||
cel[3] + cel[5] + cel[7] == 3) && oud == 0
) { verd[verdlength] = i}
cel[i] = oud;
if (cel[i] == 0) {
if (keren != 1) {leeg[leeglength] = i} else
if (cel[5] == 0) {leeg[0] = 5; leeg[1] = 10 - geklikt} else
if (i % 2 != 0) {leeg[leeglength] = i}
};
}
}
function aanval() {aanv = new Array();
for (i = 1; i < 10; i++) { oud = cel[i]; cel[i] = 10;
if ( (cel[1] + cel[2] + cel[3] == 30 ||
cel[4] + cel[5] + cel[6] == 30 ||
cel[7] + cel[8] + cel[9] == 30 ||
cel[1] + cel[4] + cel[7] == 30 ||
cel[2] + cel[5] + cel[8] == 30 ||
cel[3] + cel[6] + cel[9] == 30 ||
cel[1] + cel[5] + cel[9] == 30 ||
cel[3] + cel[5] + cel[7] == 30) && oud == 0
) { aanv[aanvlength] = i}
cel[i] = oud;
}
}
function strategie() {strat = new Array();
for (i = 1; i < 10; i++) { oud = cel[i]; cel[i] = 10;
if ( (cel[1] + cel[2] + cel[3] == 20 ||
cel[4] + cel[5] + cel[6] == 20 ||
cel[7] + cel[8] + cel[9] == 20 ||
cel[1] + cel[4] + cel[7] == 20 ||
cel[2] + cel[5] + cel[8] == 20 ||
cel[3] + cel[6] + cel[9] == 20 ||
cel[1] + cel[5] + cel[9] == 20 ||
cel[3] + cel[5] + cel[7] == 20) && oud == 0
) {
if (keren != 3) {strat[stratlength] = i} else if (i % 2 != 0) {strat[stratlength] = i}
}
cel[i] = oud;
}
}
function wijzig(form,element){
wijziging(elementname);
elementvalue = xo;
beurt = wisselen(beurt);
formbeurtenvalue = wie;
verdedig(); aanval(); strategie(); win();
if (auto == 0 || wint == 1) {return} else {
timerID = setTimeout('zetten()',600)
}
}
initieer();
//-->
</Script>
这是一个3子棋的游戏,不太大,把上面这段代码加入<body></body>中。
以上就是关于用visual basic设计一个简单的小程序,请大家帮帮我,这是老师布置的作业全部的内容,包括:用visual basic设计一个简单的小程序,请大家帮帮我,这是老师布置的作业、求c#小程序一段,要交作业滴,最好有界面,有算法滴,有的给个现成的就行,给的追加高分,拜托了、求一个java小程序(要是那种小型游戏程序)等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)