This check is still failing. I split up the conditions so I can test them. It fails for cs = "WWWW", "WXW", "WWWWWWWWRWWWWWW"

```
/** 
 * Check to ensure all lines are only composed of walls, 
 * entrance, exit, and space
 */
protected boolean invalidMazeCharacters(CharSequence cs) {

    p = Pattern.compile("^W+R|X|\\s*W+$");
    m = p.matcher(cs);
    if (!m.matches()) {
        return true;
    }
    return false;
}

```