Send your feedback or ask for help here!
What happens if two snails want to occupy the same cell at the same moment because that is the shortest path to their dest?
it’s the shorter path that counts here there are no collisions between snails, snails teleport
i am trying to create episode 2 with collision
You should specify it in the description :
- Two snails or more can be at the same place at the same time (no collisions)
There is no collision nor change in speed nor effect on each other’s path. The snails do not effect each other.
Though there is a solution that does not rely on mapping the snail paths so exactly.
Because of CG Web Dev made the topic creation too hard and glitchy i’m actually reply directly here because it rely on the subject so actually I’ve done this puzzle but i can’t get 100% in submit with validators I’m stuck at 75% because of test 3 & 8 so my question is how can find what’s going on and why it fails, can we have their unit test to check why I’m failing at these steps?
I can share my code for anyone who want help me.
Thanks in advance
I think you mean Validators 3 and 8 instead of Tests 3 and 8 (tests are the ones you can see, validators you cannot).
Validator 3 is the same as Test 3 except for the speeds of the snails. Try generating some random numbers within the constraints to test out your code.
Validator 8 is the same as Test 8 except for the map. The lanes are horizontally mirrored and then ordered and numbered differently.
Hope this helps.
Hey ty for ur answer i tried random numbers or speed for V3 it works and get the best snails to win and for V8 tried also to horizontally mirrored my lanes and replace numbers in different places and it works too but still doesn’t solve the problem why it doesn’t pass these validators even if my code works i will share u my code if u want : https://codeshare.io/MNENNp
Validator 3: For a start, try speedSnail of 1, 2 and 3 (note: not the input of the validator). Your code gives 2 as the answer, while the correct answer is 3.
Validator 8: I tried your code on the validator, and the following error message appeared:
Unhandled exception. System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter ‘index’)
at Race.FillMap on line 413
at Solution.Main on line 532
i got the puzzle done… but i wonder if for further puzzles to consider more than one “#” in each row. thank you for the fun!
Hey bro, i would thank you for ur details, now i got 100% and finally done with this puzzle, but i’ve a question for u, actually how do u call the validator for a specific code like u did for trigger the exception?
Glad to know you’ve made it!
Validators are accessible in the contribution view of a puzzle. Normally you need to be at higher levels to have access to that view.
“Though there is a solution that does not rely on mapping the snail paths so exactly.”
I think that this fact has to be stated in the puzzle description a bit more vivid.
I was confused buy all the tiny details (do snails allow to overlap and what not) thus implemented the boring BFS approach. Only when I was checking other solutions, i’ve figured out that there is significantly less involved solution exists.