五子棋(vb算法)

发布时间:2017-1-17 8:50:29 编辑: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博客
下一篇:这样软件开发人才级别的划分你同意吗

相关文章

相关评论