开发者

How to tell winner in a vb game?

I am programming the board game Sequence in vb 2010 and I have gotten to the point where I now need to figure out if someone has won or not

Here is a link to the game Sequence and it's rules: http://www.jaxgames.com/seq.htm

I have looked at How to find the winner of a tic-tac-toe game of any size? which is similar to my problem but gets very complicat开发者_Python百科ed if I wanted to try and migrate the idea to Sequence.

I am wondering if anyone has any ideas on how to tell if there is a winner?

The only way I can think of is keep a list of all the possible winning positions and I would not like to do that.


You should look at the Minimax Algorithm which can be applied to determine the next move(s) in a game based on the current state. You could write your implementation such that when the computer can't determine a next possible move, the other player is declared the winner (or some other criteria, I am not familiar with the game itself).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜