Skip to content

Instantly share code, notes, and snippets.

@nusco
Last active April 23, 2020 09:27
Show Gist options
  • Save nusco/91a00a0ea0e62d7fd42063178c49ab20 to your computer and use it in GitHub Desktop.
Save nusco/91a00a0ea0e62d7fd42063178c49ab20 to your computer and use it in GitHub Desktop.
A (hypothetical) example of how programming works, as opposed to ML
enemy = get_nearest_enemy()
if enemy.distance() < 100:
decelerate()
if enemy.is_shooting():
raise_shield()
else:
if health() > 0.25:
shoot()
else:
rotate_away_from(enemy)
else: # ...a lot more code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment