Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GH-1054] Bots movement improvement #1055

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

tvillegas98
Copy link
Contributor

@tvillegas98 tvillegas98 commented Jan 21, 2025

Motivation

The randomness of the movements led our bots walking near the externall walls, now they will move through positions around the map and also they will be able to track players

Closes #1054

Summary of changes

How to test it?

Play with the bots and leave a feedback about their behavior!

Checklist

  • Tested the changes locally.
  • Reviewed the changes on GitHub, line by line.
  • This change requires new documentation.
    • Documentation has been added/updated.

@tvillegas98 tvillegas98 changed the title [GH-1054] Bots Positioning [GH-1054] Bots movement improvement Jan 21, 2025
@tvillegas98 tvillegas98 marked this pull request as ready for review January 24, 2025 20:16
def get_distance_and_direction_to_positions(base_position, end_position) do
%{x: x, y: y} = Vector.sub(end_position, base_position)

distance = :math.sqrt(:math.pow(x, 2) + :math.pow(y, 2))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use the distance function that you just created in apps/bot_manager/lib/math/vector.ex?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] - Make the bots move through positions instead of random directions
2 participants