Advertisement
Alphyn

Untitled

Feb 23rd, 2022
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.16 KB | None | 0 0
  1. import sys
  2. import math
  3.  
  4. # Auto-generated code below aims at helping you parse
  5. # the standard input according to the problem statement.
  6.  
  7. thrust = "BOOST"
  8. # game loop
  9. while True:
  10.     # next_checkpoint_x: x position of the next check point
  11.     # next_checkpoint_y: y position of the next check point
  12.     # next_checkpoint_dist: distance to the next checkpoint
  13.     # next_checkpoint_angle: angle between your pod orientation and the direction of the next checkpoint
  14.     x, y, next_checkpoint_x, next_checkpoint_y, next_checkpoint_dist, next_checkpoint_angle = [int(i) for i in input().split()]
  15.     opponent_x, opponent_y = [int(i) for i in input().split()]
  16.  
  17.     # Write an action using print
  18.     # To debug: print("Debug messages...", file=sys.stderr, flush=True)
  19.    
  20.  
  21.     # You have to output the target position
  22.     # followed by the power (0 <= thrust <= 100)
  23.     # i.e.: "x y thrust"
  24.     #if b == True:
  25.     #    thrust = "BOOST"
  26.     #    b = False
  27.     if next_checkpoint_angle > 90 or next_checkpoint_angle < -90:
  28.         thrust = 0
  29.     else:
  30.         thrust = 100
  31.  
  32.  
  33.     print(str(next_checkpoint_x) + " " + str(next_checkpoint_y) + " " + str(thrust))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement