Ad
  • Custom User Avatar

    Looks good Giacomo, thanks

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Thanks, approved.

  • Custom User Avatar

    Fair enough, I did intend it to be a very much a beginners challenge but good suggestions (I'm not sure it's an issue though, rather more suggestions)

  • Custom User Avatar

    Thanks! So this is an interesting output:

    [
       ['_', '_', '_', 'W', '_', '_'],
       ['W', 'W', '_', 'W', '_', '_'],
       ['W', 'W', '_', '_', 'W', '_'],
       ['_', 'W', '_', '_', '_', 'W'],
       ['_', '_', '_', '_', '_', 'x'],
       ['W', 'W', 'W', 'W', 'W', 'W']
    ]
    [
       ['W', 'W', 'W', 'W', 'W', 'W'],
       ['W', 'W', 'W', 'W', 'W', 'W'],
       ['W', 'W', 'W', 'W', 'W', 'W'],
       ['W', 'W', 'W', 'W', 'W', 'W'],
       ['W', 'W', 'W', 'W', 'W', 'W'],
       ['W', 'W', 'W', 'W', 'W', 'W']
    ]
    

    Is that intentional?

  • Custom User Avatar

    I see what you mean, just struggling to come up with a maze which fails my current code

  • Custom User Avatar

    Ahh forogt that N could go up to 100! (that would be a pretty ridiculous output!) could you add a conditional statement for the log? Something like

    if (N < 20) {
      console.log(maze);
    }
    

    So that you wouldn't get the super huge mazes.

  • Custom User Avatar

    Hey, can I see your solution? (but mark it with as a spoiler so people who haven't finished it yet can't see it)

  • Custom User Avatar

    Which words did you spot? was it 'love'? I might need to be a bit more specific in the description

  • Custom User Avatar

    Ahhh that makes sense, will try it with some different mazes.

    It looks a bit misleading when the errors come up as even loging the maze to the console doesn't show the random mazes generated (it just looks like it's saying the first maze is hitting a wall or never getting to x). Maybe you could update the tests to show the random mazes?

    Great Kata, early beginnings of a game engine!

  • Custom User Avatar

    Hey, nice Kata. Might be worth putting in your description that if there are no even fibonacci return undefined.

    Or for clarity (and good practice for handling errors) get the function to return something like "no even fibonacci numbers found"

    Up to you whether you want to change the error message, but would update the description for when no even numbers.

  • Custom User Avatar

    Well spotted, thanks!

  • Custom User Avatar

    Hey franzmoro88, I'm almost there with my solution but I keep failing with these tests:

    Looks like you hit a wall! Restarting level.
    Never got to x
    Found the x more than once.
    Found the x but kept moving and collecting cells afterwards.
    

    But my path array is:

    [[0,0],[0,1],[0,2],[1,2],[2,2],[3,2],[4,2],[4,3],[4,4],[4,5]]

    And my values are:

    ["_","_","_","_","_","_","_","_","_","x"]

    As far as I know this seems like a valid solution. Are the tests only against the first maze (the one in the description) or are there others? When I log the output from maze I only get the maze from the description.

  • Custom User Avatar

    No worries, glad to help, I'm still getting used to testing too.

  • Loading more items...