Hi. I’m confused by this statement in the Wood League instructions:
The training of creeps represent an extra mandatory command every turn. For barracks not to begin training new units, a player has to use the TRAIN command with no identifier.
Earlier in the instructions, it says you have to explicitly train using the barracks identifiers. Is training automatic thereafter? If not, why is TRAIN with no identifier necessary?
To add on this the speed of all the characters would be nice to have. It seems that things move at different speeds but I’m not sure how fast or slow it is. Knowing how many turns it’ll take for me to reach a site or for my pawns to reach the opponent’s queen seems essential…
There is a problem with the starting League, Wood 3.
Half of the League can easily beat Dame Boss every single time, but there are too many players, so the players fight each other instead, and nobody rises high enough to even fight Dame Boss unless you have an awesome “Bronze-level” program.
So everybody is stuck in Wood 3
But when a barracks acts, the creeps are spawned directly. It means that if a tower acts after a barracks, it can actually shoot a new creep. But if the tower acts before this barracks, it can’t.
It’s pretty weird to rely on the tower id to know if it can shoot new creeps or not.
Hey everyone, this is my first codingame and I am just generally having a hard time deciphering the variables and commands available to me. I just reviewed the “onboarding” project to see if the documentation for a game is standardized and that does not seem to be the case.
I just cannot figure out this format
Line 1: an integer numSites, indicating the number of building sites on the map.
Next numSites lines: 4 integers siteId x y radius
siteId: The numeric identifier of the site
x y: The numeric coordinates of the site's center
radius: The radius of the site
numSites is a variable that I can call but I don’t understand the 2nd line. Is it also a function? Or is this an example of how to use it in the program?
Separate to documentation, another issue I am having is determining how to move the queen to the nearest building site. Is there some function I am missing that returns all these coordinates so I can determine proximity or do I just take a shot in the dark?
reset the python code and then start from there, you will still have the file and can add the current code back in step by step
i use python as many others do and there’s no problem, so i guess you deleted something or messed something up, but you should recover easily if you follow the above steps
It depends on how you look at it. If two sites have the same HP, the larger site will be able to hit creeps that are farther from the site center. But the smaller creep will be able to hit creeps farther from the tower edge. At first, that seems irrelevant, but remember that towers do damage according to how much farther their bullet could have flown to get to max range. This means that if a creep is at the tower base, the smaller site sometimes does more damage (depending on rounding).
I’m having a weird issue where the game passes me the value 800 for the touchedSite variable. An ID which doesn’t exist and isn’t passed as part of the sites.
Because now i’m just forced to press “play my code” for a couple times till i get long enough game.
Then i can test my strategy, and if i want to test on the other map i need to repeat the process.
The “replay in same conditions” button doesn’t help?
Separate to documentation, another issue I am having is determining how to move the queen to the nearest building site. Is there some function I am missing that returns all these coordinates so I can determine proximity or do I just take a shot in the dark?
All the positions are given line by line through the standard input.
It’s like reading a file from code.
You’re not given any functions you can call. You can only output commands on the standard output (once you have read the turn’s input).
Here, the x, y positions of all sites are given before the game loop starts. You can save them all to a datastructure.
Then, you are given the unit’s positions on every succesive turn (a turn ends when all players have output a command). This is when you can compare the queen’s position to the structure positions.