export default function take2rows(template: string[], name: string): boolean {
  let count = 0,
    curIndex: null | number = null

  for (let index = 0; index < template.length; index++) {
    const arr = template[index].split(' ')
    const location = arr.indexOf(name)
    if (location < 0) continue
    if (count === 0) {
      count += 1
      curIndex = location
    } else {
      if (curIndex === location) {
        count += 1
      }
    }
  }

  return count === 2
}
