main/board.rb
def format(maker_breaker)
    index = breaker.guess
    index = maker.code if maker_breaker.type == 'code'
    "#{@pegs[index[0]]} #{@pegs[index[1]]} #{@pegs[index[2]]} #{@pegs[index[3]]}"
  end
# Output the code or guess pegs depending on what has been passed
Output the code or guess pegs depending on what has been passed
Output the code or guess pegs depending on what has been passed
def format(maker_breaker)
    index = breaker.guess
    index = maker.code if maker_breaker.type == 'code'
    "#{@pegs[index[0]]} #{@pegs[index[1]]} #{@pegs[index[2]]} #{@pegs[index[3]]}"
  end
def format ( maker_breaker ) index = breaker . guess index = maker . code if maker_breaker . type == 'code' "#{@pegs[index[0]]} #{@pegs[index[1]]} #{@pegs[index[2]]} #{@pegs[index[3]]}" end
Output the code or guess pegs depending on what has been passed
Output the code or guess pegs depending on what has been passed
maker_breaker