Mad Pod Racing - Puzzle Discussion

I think you have to google it or learn it on another website, as this thread is for discussing Mad Pod Racing, instead of the syntax of any programming languages.

ok yes i see now sill question i made it a variable but i dont think i did it right now it says i didnt make a output and there was a error with my “else” on line 24 i dont understand it was working just fine now its not :confused:

while true; do
read -r x y nextCheckpointX nextCheckpointY nextCheckpointDist next_Checkpoint_Angle
read -r $opponent_X $opponent_Y
read -r thrust
echo “Debug messages…” >&2
echo ${nextCheckpointX}" “${nextCheckpointY}” 100"
if next_Checkpoint_Angle < -160 or next_Checkpoint_Angle > 200
thrust = 0
else
thrust = 97
end if
echo ${nextCheckpointX}" “${nextCheckpointY}” 100"
if nextCheckpointDist < 3000 then
thrust = 5
else
thrust = 97
end if
echo ${nextCheckpointX}" “${nextCheckpointY}” 100"
done

Your new code still suffers from the issues I mentioned in my earlier comment. You should consider learning how to write bash code on another website first, then coming back to CodinGame to practise.

ok thank you

just print x,y,thrust

how to finish mad pot racing level 3 using python 3?

Watch replays to see what can be improved. Maybe use boost.

but I already use boost

Then do the other thing.

but I do not now how to

I am a be beginner

I tried one whole day

Read the resources on the front page of the puzzle, and read through the posts in this thread. They may give you some ideas.

I try that before

can not work

If Mad Pod Racing proves too difficult for you, try something else first. You need physics/advanced algorithm knowledge to advance to higher leagues.

but this is the lowest puzzles I know

Those are bot programming puzzles. There are other puzzles: https://www.codingame.com/training

why I can not boostimport sys
import math

Auto-generated code below aims at helping you parse

the standard input according to the problem statement.

game loop

while True:
# next_checkpoint_x: x position of the next check point
# next_checkpoint_y: y position of the next check point
# next_checkpoint_dist: distance to the next checkpoint
# next_checkpoint_angle: angle between your pod orientation and the direction of the next checkpoint
x, y, next_checkpoint_x, next_checkpoint_y, next_checkpoint_dist, next_checkpoint_angle = [int(i) for i in input().split()]
opponent_x, opponent_y = [int(i) for i in input().split()]

if next_checkpoint_angle > 90 or next_checkpoint_angle < -90:
    thrust = 0
    print(next_checkpoint_x,next_checkpoint_y,thrust)
elif next_checkpoint_angle < 90 and next_checkpoint_angle > -90:
    thrust = 100
    print(next_checkpoint_x,next_checkpoint_y,thrust)
elif next_checkpoint_dist > 100:
    print(str(next_checkpoint_x) + " " + str(next_checkpoint_y)+" "+ "BOOST")

sorry It is
why i can not boost
import sys
import math

Auto-generated code below aims at helping you parse

the standard input according to the problem statement.

game loop

while True:
# next_checkpoint_x: x position of the next check point
# next_checkpoint_y: y position of the next check point
# next_checkpoint_dist: distance to the next checkpoint
# next_checkpoint_angle: angle between your pod orientation and the direction of the next checkpoint
x, y, next_checkpoint_x, next_checkpoint_y, next_checkpoint_dist, next_checkpoint_angle = [int(i) for i in input().split()]
opponent_x, opponent_y = [int(i) for i in input().split()]

if next_checkpoint_angle > 90 or next_checkpoint_angle < -90:
    thrust = 0
    print(next_checkpoint_x,next_checkpoint_y,thrust)
elif next_checkpoint_angle < 90 and next_checkpoint_angle > -90:
    thrust = 100
    print(next_checkpoint_x,next_checkpoint_y,thrust)
elif next_checkpoint_dist > 100:
    print(str(next_checkpoint_x) + " " + str(next_checkpoint_y)+" "+ "BOOST")