Well, time to code!
Important note: I just changed: "Stone" is not needed as a class right now, if I need it in the future I will change it, for now, there will be an integer in every position: 0-No stone 1-Black Stone 2-White Stone, 3-Unplayable place
Some things about how I will program this:
- Even if inside an IF there is only one line, I will still use the "{"
- Lot's of comments on code.
- Obvious comments mode=on.
First way I thought about creating the board:
This goes with the math of the last post. Puts the correct "component" in every space of the array.
So, now, just to show it on the console, in the "Console" class:
So, that's it for now, runnig this I had:This goes with the math of the last post. Puts the correct "component" in every space of the array.
So, now, just to show it on the console, in the "Console" class:
In 9x9:
In 19x19:
I would use simple array for fast access and enum type for colors.
ReplyDeleteYes, that's a good idea.
ReplyDelete