public State makeMove(State state, char dir, char[][] map) {
    State newState = new State(state, dir);
    char block = map[newState.row][newState.col];
    switch (block) {
    case 'b':
      newState.blue = true;
      break;
    case 'y':
      newState.yellow = true;
      break;
    case 'r':
      newState.red = true;
      break;
    case 'g':
      newState.green = true;
      break;
    }
    return newState;
  }