private void tick() {
        StringBuilder sb = new StringBuilder();
        for (Iterator<Snake> iterator = getSnakes().iterator();
                iterator.hasNext();) {
            Snake snake = iterator.next();
            snake.update(getSnakes());
            sb.append(snake.getLocationsJson());
            if (iterator.hasNext()) {
                sb.append(',');
            }
        }
        broadcast(String.format("{'type': 'update', 'data' : [%s]}",
                sb.toString()));
    }