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

[Server]: Construct all robots at the beginning of the game #192

Open
xXDMOGXx opened this issue Oct 22, 2024 · 0 comments
Open

[Server]: Construct all robots at the beginning of the game #192

xXDMOGXx opened this issue Oct 22, 2024 · 0 comments
Assignees
Labels
approved This issue has passed the draft stage, and is ready to be assigned D2 Medium Difficulty new-member Issue is appropriate for new members P2 Medium Priority

Comments

@xXDMOGXx
Copy link
Contributor

xXDMOGXx commented Oct 22, 2024

Task Description:

The Robot class can be found in src/server/robot/robot.ts. This class is an in-code representation for a physical ChessBot. This is great an all, but we don't actually create all the 32 instances at the start of the game right now.... we need to though.

Implementation Steps:

  1. We will put it at the top of server/api/api.ts.
  2. Some changes will need to be made to the Robot class and the bot-server-config.json.
  • In src/server/robot/robot.ts, you will need to change the constructor to accept only the id, since everything else can be calculated from that. You will then calculate all the other needed variables in the body of the constructor.
  • In src/server/api/bot-server-config.json, you will need to add a new field to each robot. This field is startHeading. It determines what direction the robot will be facing when constructed. The robots will face each other, and a heading of 0 is to the right, like a unit circle.
  1. You will do two things for each robot. Construct a new Robot() passing in the id, and then call robotManager.add() passing in the robot. Do this for all 32. The ids of each robot can be found in the bot-server-config.

Additional Notes and Resources:

The RobotManager definition is in src/server/robot/robot-manager.ts.

Expected Timeline:

This should be able to be completed in a single ChessBots meeting, or about a week.

If you have any questions while working on this task, don't hesitate to do any one of the following:

  • Ask a lead at a meeting
  • Post in Discord
  • Reply to this issue
@xXDMOGXx xXDMOGXx added P2 Medium Priority D2 Medium Difficulty approved This issue has passed the draft stage, and is ready to be assigned new-member Issue is appropriate for new members labels Oct 22, 2024
@xXDMOGXx xXDMOGXx assigned Niya04 and unassigned Niya04 Oct 25, 2024
@Niya04 Niya04 self-assigned this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This issue has passed the draft stage, and is ready to be assigned D2 Medium Difficulty new-member Issue is appropriate for new members P2 Medium Priority
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants