If you think the Android project abalone-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/**
* Copyright (c) 2010-2011 Yaroslav Geryatovich, Alexander Yakushev
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*//*www.java2s.com*/package com.bytopia.abalone.mechanics;
publicclass Debug {
publicstaticvoid main(String[] args) throws Exception {
System.out.println("start");
ConsoleWatcher cw = new ConsoleWatcher();
Game g = new Game(new ClassicLayout(), (byte)3, new AiAnn(), new AiDeborah(), cw, (byte)0);
cw.setGame(g);
g.start();
}
publicstaticbyte convDir(String s) {
if (s.equals("NW"))
return Direction.NorthWest;// public static Cell convCell(String s) {
// return new Cell((int) s.charAt(0) - (int) 'A' + 1, Integer
// .parseInt(Character.toString(s.charAt(1))));
//}
elseif (s.equals("N"))
return Direction.North;
elseif (s.equals("E"))
return Direction.East;
elseif (s.equals("SE"))
return Direction.SouthEast;
elseif (s.equals("S"))
return Direction.South;
elsereturn Direction.West;
}
// public static Cell convCell(String s) {
// return new Cell((int) s.charAt(0) - (int) 'A' + 1, Integer
// .parseInt(Character.toString(s.charAt(1))));
// }
publicstaticbyte convSide(String s) {
if (s.equals("W"))
return Side.WHITE;
elsereturn Side.BLACK;
}
}