From: gumartinm Date: Wed, 5 Sep 2012 02:34:00 +0000 (+0200) Subject: No time for comments X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=59925fbd5109b18476b4192d3a74a0a7185cb24a;p=AndroidReversiForFun%2F.git No time for comments --- diff --git a/src/de/android/reversi/Board.java b/src/de/android/reversi/Board.java index d802dde..1ee6d7b 100644 --- a/src/de/android/reversi/Board.java +++ b/src/de/android/reversi/Board.java @@ -5,7 +5,7 @@ import java.util.List; public class Board implements Cloneable { private final static short [][] directions = { { 0, 1 }, { 1, 1 }, { 1, 0 }, { 1, -1 }, - { 0, -1 }, { -1, -1 }, { -1, 0 }, { -1, -1 } }; + { 0, -1 }, { -1, -1 }, { -1, 0 }, { -1, 1 } }; public static final short NUMBER_OF_COLUMNS = 8; public static final short NUMBER_OF_ROWS = 8; @@ -200,7 +200,7 @@ public class Board implements Cloneable { final List flippedDiscs = new ArrayList(); boolean match = false; - while (row > 0 && column > 0 && + while (row >= 0 && column >= 0 && row < Board.NUMBER_OF_ROWS && column < Board.NUMBER_OF_COLUMNS && !empty(column, row)) {