constructor(width, height, food) {
    // end::description[]
    // tag::solution[]
    this.width = width;
    this.height = height;
    this.food = new Queue(food);
    this.snake = new Queue([[0, 0]]);
    this.tail = new Set([[0, 0]]);
    this.dirs = {
      U: [-1, 0], D: [1, 0], R: [0, 1], L: [0, -1],
    };
    // end::solution[]
    // tag::description[]
  }
Initialize game with grid's dimension and food order.
@param {number} width - The screen width (grid's columns)
@param {number} height - Screen height (grid's rows)
@param {number[]} food - Food locations.