Groovy web console

subscribe to the feed Subscribe
to this
site

spotsides

Published 1 month ago by jonatas emidio
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
//info
me = '2B'
wanted = '1B'
voo = 'AD1'

flights = [
    'AD1': ['1A', '2A','3A', '1B', '3B', '1C', '2C', '2C'],
    'AD2': ['10A', '20A','30A', '10B', '30B', '10C', '20C', '20C']
]

/**
ACB DEFGH IJK
ABC DEFG HIJ
ABC DEF GHI
AB CDE FG
ABC DEF
*/
def find(id, myseat){
    return flights[id] - myseat
}



find(voo, me)