You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2018. It is now read-only.
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.
Edit: Maybe "snakes" could be called "other_snakes".
The text was updated successfully, but these errors were encountered:
Yeah you are correct this it is redundant, but it's also helpful, because you don't need to parse your own snake out of the list based on an id. Also we're not worried about the extra size in the payload, so we will be leaving this in for this year.
Again thanks for the issue, and keep bringing up anything you think of in relation to the server
From: battle-snake#31
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.
This is a minor optimization, but it will be removing redundancy and therefore reducing the size of the JSON string.
Edit: Maybe "snakes" could be called "other_snakes".
The text was updated successfully, but these errors were encountered: