X-Git-Url: https://git.hedgecode.org/?p=chesshog.git;a=blobdiff_plain;f=chesshog-graphics%2Fsrc%2Fmain%2Fjava%2Forg%2Fhedgecode%2Fchess%2Fimg%2Fboard%2FSquarePair.java;h=5fcdd6612322e2db0c18dfefae134e1e42f099ee;hp=836d2736f28a9fd559b49b0e4ac187d27dcb7a6e;hb=0b24d5b71c19ba38060297084ad39685f76a8539;hpb=cc2bc357ce3c21a0b092af8b2ba3e174d10cac81 diff --git a/chesshog-graphics/src/main/java/org/hedgecode/chess/img/board/SquarePair.java b/chesshog-graphics/src/main/java/org/hedgecode/chess/img/board/SquarePair.java index 836d273..5fcdd66 100644 --- a/chesshog-graphics/src/main/java/org/hedgecode/chess/img/board/SquarePair.java +++ b/chesshog-graphics/src/main/java/org/hedgecode/chess/img/board/SquarePair.java @@ -20,7 +20,7 @@ import java.awt.image.BufferedImage; import java.util.Objects; /** - * + * Storage class for set of images of chess board squares. * * @author Dmitry Samoshin aka gotty */ @@ -29,7 +29,7 @@ public class SquarePair { private final T dark; private final T light; - SquarePair(T dark, T light) { + private SquarePair(T dark, T light) { this.dark = dark; this.light = light; } @@ -42,6 +42,13 @@ public class SquarePair { return light; } + public boolean isFilled() { + if (this.dark == null || this.light == null) { + return false; + } + return true; + } + @Override public boolean equals(Object o) { if (!(o instanceof SquarePair)) {