‘壹’ 求VB编写中国象棋的源代码。急求。必有重谢
贴保存棋局和读取棋局部分的,你先看看:
Rem 读取棋局
Private Sub mnuRead_Click()
Dim s As String, i As Integer, t
If Dir(App.Path & "\cchess.che") = "" Then MsgBox "没有棋局文件可以读入!请先保存棋局!", , "中国象棋": Exit Sub
Open App.Path & "\cchess.che" For Input As #1
Input #1, s
Close #1
s = Replace(s, vbCrLf, "")
s = Trim(s)
t = Split(s, " ")
If UBound(t) <> 89 Then MsgBox "棋局文件已遭到破坏!请重新保存棋局!", , "中国象棋": Exit Sub
For i = 0 To 89
a(i) = Val(t(i))
Next
MsgBox "棋局文件已成功读入!", , "中国象棋"
End Sub
Rem 保存棋局
Private Sub mnuSave_Click()
Dim s As String, i As Integer
s = ""
For i = 0 To 89
s = s & " " & a(i)
Next
s = Trim(s)
Open App.Path & "\cchess.che" For Output As #1
Print #1, s;
Close #1
MsgBox "当前棋局已成功保存!", , "中国象棋"
End Sub
‘贰’ VB 象棋人机程序对弈源代码
你不如去抢!!!
就这样的态度,这样的0分,还想要人家给你白做!
哪凉快哪呆去吧!!!
最恨这种要求人还二五八万似的嚣张得要死的!!!!!!
‘叁’ 用C语言输出中国象棋棋盘的源代码!!急!急!急!
#include <stdio.h>
void main()
{int r=0;
int c=0;
int star_one=10;
for(r=0;r<=star_one*9;r+=2)
{ for(c=0;c<=star_one*8;c++)
{if((r%star_one==0 || c%star_one==0)&&c%2==0 && (r<=star_one*4 || r>=star_one*4+star_one) || (r>=star_one*4 && r<=star_one*4+star_one && (c==0 || c==star_one*8)))
{printf("%c",'*');}
else
{printf("%c",' ');}
}
printf("\n");
}
}
‘肆’ VB 中国象棋源代码
你是要交作业吗?是要原创的吗?网上的可能很多人都有,但我自己写的还没有发表,哈哈。这里贴不了全的,我可以写一段给你看看,你觉得可以,就找我要吧,完全free的,能帮到你最好。
贴保存棋局和读取棋局部分的,你先看看:
Rem 读取棋局
Private Sub mnuRead_Click()
Dim s As String, i As Integer, t
If Dir(App.Path & "\cchess.che") = "" Then MsgBox "没有棋局文件可以读入!请先保存棋局!", , "中国象棋": Exit Sub
Open App.Path & "\cchess.che" For Input As #1
Input #1, s
Close #1
s = Replace(s, vbCrLf, "")
s = Trim(s)
t = Split(s, " ")
If UBound(t) <> 89 Then MsgBox "棋局文件已遭到破坏!请重新保存棋局!", , "中国象棋": Exit Sub
For i = 0 To 89
a(i) = Val(t(i))
Next
MsgBox "棋局文件已成功读入!", , "中国象棋"
End Sub
Rem 保存棋局
Private Sub mnuSave_Click()
Dim s As String, i As Integer
s = ""
For i = 0 To 89
s = s & " " & a(i)
Next
s = Trim(s)
Open App.Path & "\cchess.che" For Output As #1
Print #1, s;
Close #1
MsgBox "当前棋局已成功保存!", , "中国象棋"
End Sub
‘伍’ 如何在Microsoft Visual Studio 2005中正确运行陶善文的中国象棋人机对弈系统源码
另外,站长团上有产品团购,便宜有保证
‘陆’ c++程序设计 中国象棋源代码
我提供两个功能完善,而且最重要的,我认为算法设计比较好的中国象棋源代码,因为是源码网的,所以可以学习参考下:
http://www.codefans.net/soft/1466.shtml
http://www.codefans.net/soft/1289.shtml
‘柒’ 哪位好心人能帮我提供“中国象棋单机版”的VC++源代码,急用,万份感激!
我有一份,我也在是研究象棋的源代码