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

Your snake (You) is sent twice #31

Open
exzizt opened this issue Jan 31, 2018 · 1 comment
Open

Your snake (You) is sent twice #31

exzizt opened this issue Jan 31, 2018 · 1 comment

Comments

@exzizt
Copy link

exzizt commented Jan 31, 2018

Since this year your snake (You) is sent over as a Snake object (and not an id used to identify your snake in the Snakes list), I don't think it is necessary to send over your snake again in the Snakes list.

`interface World {
  object: 'world';
  id: number;
  you: Snake; # Your snake
  snakes: List<Snake>; # Contains your snake again
  height: number;
  width: number;
  turn: number;
  food: List<Point>;
}`

This is a minor optimization, but it will be removing redundancy and therefore reducing the size of the JSON string.

@brandonb927
Copy link

@exzizt Thanks for this, would you mind opening this over at https://github.com/sendwithus/battlesnake-server/issues?

Cheers 🍻

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

No branches or pull requests

2 participants