Added valid? method so number of X's can only be equal or 1 more than that of 0's.