五子棋(vb算法)

发布时间:2017-3-28 20:06:47 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"五子棋(vb算法)",主要涉及到五子棋(vb算法)方面的内容,对于五子棋(vb算法)感兴趣的同学可以参考一下。

For i = 1 To 11  For j = 1 To 11  If map(i, j) = a And map(i + 1, j + 1) = a And map(i + 2, j + 2) = a And map(i + 3, j + 3) = a And map(i + 4, j + 4) = a Then GameOver = a: Exit Function  Next jNext iFor i = 5 To 15  For j = 5 To 15  If map(i, j) = a And map(i - 1, j - 1) = a And map(i - 2, j - 2) = a And map(i - 3, j - 3) = a And map(i - 4, j - 4) = a Then GameOver = a: Exit Function  Next jNext iFor i = 5 To 15  For j = 1 To 11  If map(i, j) = a And map(i - 1, j + 1) = a And map(i - 2, j + 2) = a And map(i - 3, j + 3) = a And map(i - 4, j + 4) = a Then GameOver = a: Exit Function  Next jNext iFor i = 1 To 11  For j = 5 To 15  If map(i, j) = a And map(i + 1, j - 1) = a And map(i + 2, j - 2) = a And map(i + 3, j - 3) = a And map(i + 4, j - 4) = a Then GameOver = a: Exit Function  Next jNext iFor i = 1 To 15  For j = 5 To 11  If map(i, j) = a And map(i, j - 1) = a And map(i, j - 2) = a And map(i, j - 3) = a And map(i, j - 4) = a Then GameOver = a: Exit Function  If map(i, j) = a And map(i, j + 1) = a And map(i, j + 2) = a And map(i, j + 3) = a And map(i, j + 4) = a Then GameOver = a: Exit Function  Next jNext iFor i = 5 To 11  For j = 1 To 15  If map(i, j) = a And map(i + 1, j) = a And map(i + 2, j) = a And map(i + 3, j) = a And map(i + 4, j) = a Then GameOver = a: Exit Function  If map(i, j) = a And map(i - 1, j) = a And map(i - 2, j) = a And map(i - 3, j) = a And map(i - 4, j) = a Then GameOver = a: Exit Function  Next jNext i GameOver = 0 

上一篇:备份你的Sina博客
下一篇:这样软件开发人才级别的划分你同意吗

相关文章

相关评论

本站评论功能暂时取消,后续此功能例行通知。

一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家社会集体的和公民的合法权益,不得利用本站制作、复制和传播不法有害信息!

二、互相尊重,对自己的言论和行为负责。

好贷网好贷款