Ad
  • Default User Avatar

    Integer constructor deprecation warning in Java's full tests:

    warning: [removal] Integer(int) in Integer has been deprecated and marked for removal:
    
    src/test/java/SolutionTest.java:228:
    
    for (int j: releasedArr) stack.remove(new Integer(j));
    

    The preferred method nowadays is Integer.valueOf(j).

  • Custom User Avatar

    Initial solution should include all the using statements required by the provided code.

  • Custom User Avatar

    It should be stated that the key-press always resets the direction, even when the character is already facing in that same direction.

  • Custom User Avatar

    keys correspond to the enum Direction shown below.

    Not all language have enum construct, these part of the description should be made language specific.

  • Default User Avatar

    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.

  • Custom User Avatar

    C# 8.0 should be enabled.

  • Default User Avatar

    Nice Kata, but one thing in my opinion is not explained well.

    1. When a key is first pressed, the player has to change his direction to that of the current key, without moving

    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.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution