Add isValid() and isLegal() to Square