Jump to content
  • Advertisement
Sign in to follow this  
soggie

Go / Baduk / Weiqi game

This topic is 5041 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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 :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!