Ad
  • Custom User Avatar

    One thing I spotted is your check for to many doors.
    One door only takes two spaces, not three as in your solution.

    Second problem is the space character, you try to set the empty spaces to the ASCII 32 character,
    but because chars aren't reference types the values in the array are not changed.
    If you set every character in 'secondLayerChar' to a space right at the beginning, your solution works.

    One other hint, you can use string::repeat instead of for loops.