Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Integer
constructor deprecation warning in Java's full tests:The preferred method nowadays is
Integer.valueOf(j)
.Initial solution should include all the
using
statements required by the provided code.It should be stated that the key-press always resets the direction, even when the character is already facing in that same direction.
Not all language have
enum
construct, these part of the description should be made language specific.What environment this kata runs on? I've tested my code locally on MacOS .NET Core 3.1 and Windows 10 .NET Core 3.1 and .NET FW 4.7.2 and all fine but here it throws an exception.
C# 8.0 should be enabled.
Nice Kata, but one thing in my opinion is not explained well.
Ok, understandable, but then you set the direction to 8 in the very beginning, thus implying that first direction is UP, and if UP is the first move, we can move straight away, and do not need to change direction to the one that is already set properly (I thought I don't need to change from 8 to 8, but I was wrong).
Also, when you press some keys, and a direction is set, let's say, to 8, then we release all the keys (but the direction stays as 8), then we press 8 again, I thought that the player can move straight away, because his direction was already set in the proper direction. It wasn't obvious from the instructions that you need to change direction once again from 8 to 8.
In my opinion, you should state in the instructions, that in the beginning, and whenever there's a situation that ALL the keys are released, the direction is set to NONE.
This comment is hidden because it contains spoiler information about the solution