Go / Baduk / Weiqi game

Started by
0 comments, last by Zahlman 19 years, 6 months ago
Hi, I'm programming this: A go/baduk/weiqi game with these requirements: 1) Allows 2 players to play over the internet using sockets 2) No AI required. Only need to determine when a player liberates another player's rocks I have been figuring part 2 for a few days now - and the deadline is creeping closer. I'd like to ask whether if anybody has done this game before in C++ and MFC.. If you do, could you please email the source to me as a reference? Otherwise, if you know of any resources on the net, could you please redirect me to it? Thank you... email: soggie_tlz@yahoo.com
"Darkness cannot drive out darkness, only Light can do that. Hate cannot drive out hate, only Love can do that."
Advertisement
This isn't hard to work out in pseudocode... and if you know what you're doing well enough to set up sockets, you should be able to take it from here. :)

Procedure remove_all_dead_stones:  for each intersection on the board:    if the intersection is empty:      mark all stones adjacent to the current intersection.  repeat until there is no change:    for each intersection on the board:      if there is a stone on the intersection:        if any adjacent intersection has a marked stone of the same colour:          mark the stone on the current intersection.  for each intersection on the board:    if there is an unmarked stone on the intersection:      remove it.


Actually, to handle the rules properly you would need to do two passes after a move; one to remove enemy stones and then one to see if any friendly stones are removed (in which case you undo everything and report that the move is illegal (suicide)).

Oh, and don't forget about ko :)

This topic is closed to new replies.

Advertisement