[Legends of Code and Magic] Remarks and bugs

fala published a fork of the referee with fixes, see his post earlier in this thread.

Thank you for your reply. I implemented my own UI (desktop version). The problem is that the referee uses images that I donā€™t find. For example, https://github.com/CodinGame/LegendsOfCodeAndMagic/blob/master/src/main/java/com/codingame/game/ui/ConstantsUI.java#L19.

You can find them here: https://kot.rogacz.com/Projects/LOCM/cardlist.html

1 Like

Hi all, itā€™s more comfortable for me to use google sheet/excel version of the cards information. Here is what I made in google sheets. With some coloring and little summary of the data at the end:

And here is a link to download a copy of the table if you find it useful (You could add filters to the column and sort the data):
https://goo.gl/BQ5N9L

Cheers :slight_smile:

5 Likes

Nice. Thanks you.

1 Like

Assets are available
https://github.com/CodinGame/LegendsOfCodeAndMagic/tree/master/src/main/resources/view/assets

But where are the other ā€œ.pngā€ files mentioned in the code? Like B/C/D/G/L/W.png, impact.png, heal.png, etc, etc.

They are all embedded in the spritesheet.png

Oh I see! Thank you!

I have the same questions as others:

  1. What is the reason you introduce mirror matches so late into the context?
  2. Will they available for every league or some specific league?
  1. High accuracy of ranking is not needed so early in the contest. It slows down rankings considerably.
  2. I donā€™t think it can be specific to leagues.

The problem is that it seems random how many matches you play as first (easier) or second (harder), and that accounts for some of the randomness in the rankings. So possibly even playing half the number of matches but making them mirror might be more accurate than currently (and would definitely get more accurate after some time with additional matches, unlike now), while being the exact same submit time and server load.

Also, how will mirror matches be counted in case of each player winning one? One win each, one draw, or comparing the health differences?

1 Like

Winning as player 2 becomes slightly less difficult if you draft differently and play differently as player 2. But thereā€™s no way to know which player you are during draft.

2 Likes

Yes, it would add some depth to know which player you are during draft, but thatā€™s a big change to make during the contest (tricky/ugly to do without breaking some bots).

2 Likes

I donā€™t know how itā€™s done here, but there are two options: handle it as draw or ignore it, see here - winning is a boolean thing, not looking at health, turns needed to win or whatever. Tron is an example where they are just ignored, as stated lower in that link

There is a way to figure out which player you areā€¦ :slight_smile:

3 Likes

During draft?

Yeah during draft.

//MISSING instanceId of card by draft phase. Possible bug?
// it prints to error output stream
// -1 -1 -1

import java.util.;
import java.io.
;
import java.math.*;

/**

  • Auto-generated code below aims at helping you parse

  • the standard input according to the problem statement.
    **/
    class Player {

    public static void main(String args[]) {
    Scanner in = new Scanner(System.in);

     // game loop
     while (true) {
         for (int i = 0; i < 2; i++) {
             int playerHealth = in.nextInt();
             int playerMana = in.nextInt();
             int playerDeck = in.nextInt();
             int playerRune = in.nextInt();
         }
         int opponentHand = in.nextInt();
         int cardCount = in.nextInt();
         for (int i = 0; i < cardCount; i++) {
             int cardNumber = in.nextInt();
             int instanceId = in.nextInt();
             int location = in.nextInt();
             int cardType = in.nextInt();
             int cost = in.nextInt();
             int attack = in.nextInt();
             int defense = in.nextInt();
             String abilities = in.next();
             int myHealthChange = in.nextInt();
             int opponentHealthChange = in.nextInt();
             int cardDraw = in.nextInt();
             
             
             System.err.println(instanceId);
         }
    
         // Write an action using System.out.println()
         // To debug: System.err.println("Debug messages...");
    
         System.out.println("PASS");
     }
    

    }
    }

In case people doubted my claim, I just re-submitted under reCurs3 my proof of concept for figuring out which player you are. It will print a message claiming to know whether itā€™s playing as red or blue. Itā€™s not 100% reliable but probably possible to make it so.

2 Likes