Add load/save functions
This commit is contained in:
@@ -95,7 +95,9 @@ public class GomokuBoard{
|
||||
public GomokuCell get(int x, int y){
|
||||
int i = 0, j = 0;
|
||||
GomokuCell act = this.firstCell;
|
||||
while (i != x && j != y){
|
||||
// System.out.println("x: "+x+" y: "+y);
|
||||
while (i != x || j != y){
|
||||
// System.out.println("i: "+i+" j: "+j);
|
||||
Cardinal c = Cardinal.SE;
|
||||
if (i < x) i++;
|
||||
else c = Cardinal.E;
|
||||
@@ -191,7 +193,7 @@ public class GomokuBoard{
|
||||
public String toString() {
|
||||
StringBuilder out = new StringBuilder();
|
||||
GomokuCell[][] cells = this.getAllsCells();
|
||||
for (GomokuCell[] line : cells) {
|
||||
for (GomokuCell[] line : cells) {
|
||||
for (GomokuCell c : line) {
|
||||
out.append(c.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user