Ad
  • Custom User Avatar

    Invalid punctuation has been removed from Java tests.

  • Custom User Avatar

    Chess characters support added in python and java!!

    \o/

  • Custom User Avatar

    Still not working... :(

  • Custom User Avatar

    But in the JS translation, that works... :o So?

  • Custom User Avatar

    These days with UTF-8 it's basically print("ⓦⓗⓐⓣⓔⓥⓔⓡ") in any language. If it doesn't work, it's a bug feature on Codewars.

  • Custom User Avatar

    Doesn't work... :/ Still got "?" in the board instead of the chess chars when I just copy/paste the symbols in the code. Surely I'm missing some tool to configure the thing correctly.

    The JS version handles the thing differently, using something like codepoints (I guess...?):

    var c = 0x2654;
    if(p.owner == 1)
      c += 6;
    switch(p.piece)
    {
      case "pawn": c++;
      case "knight": c++;
      case "bishop": c++;
      case "rook": c++;
      case "queen": c++;
    }
    return String.fromCharCode(c);
    

    If you know how to do the same in java, I'll try it too.

  • Custom User Avatar

    Well... Could you provide the piece of code to use them as strings? Because with what I tried, I only get "?" in the board (I'm not confortable/used to unicode chars, especially in Java...)

  • Custom User Avatar

    Hi,

    I confess I didn't try those being not sure if java could handle them, when I made the translation. I'll try that, thx.

  • Custom User Avatar

    yep, that's the tool to do it. ;)

  • Custom User Avatar

    Hi,

    It's doable in java, yes. But I don't really have the envy to dig into that. Keep in mind that you have already an advantage with multiple tests running even if a failure is encountered in any of them while in other languages (such as python) this is fully sequential. So it's even "worse" in python on that aspect and I'll lazily base my decision on that to not make that improvment in java... ;o (I know, I'm really lazy, here... ;) )

    Happy you enjoyed it!

  • Custom User Avatar

    Thanks Eugene! I appreciate your comment...

    Sortable Poker Hands was actually meant as a replacement for Ranking with improvements and the extra sorting part to make the kata even more interesting.

    But... before I could remove the kata it was approved and the number of solvers multiplied... :D Now I will leave it in forever.

    Their is a message in the Ranking that brings you to Sortable. If you did Sortable first, I recommend to skip Ranking.