Recently, after the completion of my Battleship game, it occurred to me that a Go-style game could be created.
For those who don't know what Go is, here's a link:
http://www.usgo.org/what-go

I plan to start with a 18x18 board, like so:


This is also how you would play.
Looks difficult! But your signature says otherwise.
Eightx84 wrote:
Looks difficult! But your signature says otherwise.


I have already created the board. And that's a mistake on my part- I have to go with a 13x13 board, instead of a 18x18 board. I couldn't fit a 18x18 board on my calc. It's the scoring that will be difficult, since the more territory you surround, the higher your score. And it will be really hard to keep track of that. I plan to use area scoring, as illustrated here:
http://senseis.xmp.net/?Scoring

If you want to learn on how to play, here's another URL:
http://www.usgo.org/way-go

Would anyone mind helping me writing the score bit? I am stuck. How can I keep track of how much territory someone surrounds?
Well, I would have to read the rules a little bit more clearer, but it look like you could store your board in a Matrix and then add up the regions that are occupied. Make player 1 be a 1, player 2 be a 2, and empty spaces be a 0. Then you could loop through the matrix and add up the number of times a piece appears.

Hope this helps! Smile
I could do that... Thanks for the idea, Mateo!

I have created a 12x12 board. While I have created a 12x12 matrix, and figured out how to store stuff in there, how can I get the calculator to test to see if a 0 (which means that it is a empty space) is completely surrounded by 1's(for player 1) or 2's(for player 2)?
For example:
[0 1]
[1 1]
How can I get that 0, which is surrounded by 1's(by player 1's pieces), change to a 1? And, as a matter of fact, how can I have it do the same if it was surrounded by 2's(player 2's pieces)?
Just for reference, on the game board, this would be the upper left hand corner being surrounded.

I have (sort of) found a solution to this problem. Here's the code:

Code:
0->P
Repeat K=45
getKey->K
ClrHome
Output(1,23,sub("12",P+1,1
Output(1,15,"PLAYER
Input "ROW:",Q
Input "COLUMN:",C
If Q>12 or C>12:End
P+1->P
P->[A](Q,C)
[A](Q,C)->A
[A](Q+1,C)->B
[A](Q,C+1)-D
[A](Q+1,C+1)->E
If A=B and A=D and A=E and P=1:Then:M+1->M
End
If A=B and A=D and A=E and P=2:Then:N+1->N
End[/b]
P-1->P
C x 2->C
10(Q)->R
10(C)->V
For(X,0,4
For(Z,0,4
Pxl-On(R+X,V+Z,10+P
End:End


What this makes me do, however, is put three dots around (1,1), and then put the dot at (1,1). I want it to detect the three other spots already there.
The order it goes in is this:
(2,1),(2,2),(1,2) and then (1,1) .
The order I want it to go in:
(1,1),(1,2),(2,2),(2,1).
If you need a reference, look at the board above, in the first post that I made.

Can someone please help?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement