Onboarding - Puzzle discussion

#193

Rock should be the first one you kill. Aren’t you killing the farthest one, instead of the closest one?

#194

Absolutely right. I figured it out a couple of days ago. Thanks for responding, though.

#195

who can give me the correct pragram?thanks!

#196

I think that I’ll be too expensive for you.

#197

so, basically, i can win shooting one more distant enemy all the time? because from two closest every one is close enough? older variant with finding minimal distance in array of enemies i liked more

#198

You have the choice between only two enemies, if you do not kill the closest one, you’ll not succeed the onboarding.

But you can avoid always killing the closest one. That can lead to really close games. I just did this one: https://www.codingame.com/replay/solo/60109970

The aim of the onboarding is to understand how the IDE works. Having a more complex game would just ruin this aim.

#200

can anyone help me with the level Onboarding i am using the Python language thank you

#201

#202

Ok I’m not 100% new to programming languages. However I’m having a minor issue. There has to be a simpler way of coding out the enemy names vs. doing them 1 at a time in Console.WriteLine(“Name1”); and so forth. I’m just not seeing it.
Any pointers?

#203

In onboarding, you have four variables:
dist1, dist2, enemy1, enemy2.

enemy1 and enemy2 are variables containing the name of your enemies so you should use them, instead of hard coding enemy name.

#204

Oh, who can give me the answer for the first game “one enemy” in C language?

#205

I can give it to you.
http://i.ytimg.com/vi/SIKtYsdKOJw/hqdefault.jpg

#206

I have a problem in java language with this line :
int count = in.nextInt(); (line 23
he give me the error :
at java.util.Scanner.throwFor on line 864
at java.util.Scanner.next on line 1485
at java.util.Scanner.nextInt on line 2117
at java.util.Scanner.nextInt on line 2076
at Player.main on line 23 //
if I delete the line my program works for the first test but not for the rest

#207

Hey, any help would be awesome.
I’m doing it in C, not C#. I’m sure it’s something obvious, but I can help but feel like this just needs a simple if/else , but the game wont recognize “enemy2” as ship.
Here is the code:

[NO FULL CODE]

Any help would be awesome. Thanks.

#208

See here. It’s another language, but you are making the same mistake.

Is that comment from the auto generated template?

``````// printf("name of the enemy\n"); // You have to output a correct ship name to shoot ("Buzz", enemy1, enemy2, ...)
``````

No wonder this mistake comes up so often.

#209

That did help. Thanks.

#210

Hello

Can you pls teach me the first things to know in editing the script there? I want to learn how to program.

#211

CodinGame is the gaming platform for programmers. Solve programming puzzles, improve your skills, share, have fun.

Codingame is a great place to improve your coding skills, not so much to actually learn how to code (except maybe as a teaching material). I don’t know if Google agrees with me, but sites such as CodeCombat are better suited to learn the bases (old fashioned computer sciences courses at school are also great by the way).

#212

how to play

#213