Skip to content

Instantly share code, notes, and snippets.

@mattmils
Created July 25, 2011 22:15
Show Gist options
  • Save mattmils/1105382 to your computer and use it in GitHub Desktop.
Save mattmils/1105382 to your computer and use it in GitHub Desktop.
//Marzorati Claudio
//726748
const False = 0
const True = 1
range Boolean = False..True
const R = 3
const N = 2
Rematore = (
arriva -> parti -> Rematore |
rema -> Rematore |
cena -> Rematore
).
Allenatore = Allenatore[0][False][0],
Allenatore[nr:0..N][inizia:Boolean][nb:0..R] = (
when(nr < 2)r.[1..N].arriva -> Allenatore[nr+1][False][nb] |
when(nr == 2)r.[1..N].parti -> Allenatore[nr][True][nb] |
when((inizia == True)&&(nb < 3))r.[1..N].rema -> Allenatore[nr][True][nb+1] |
when(nb == 3)r.[1..N].cena -> Allenatore[0][False][0]
).
||Squadra = (r[1..N]:Rematore||Allenatore)/{remaassieme/r.[1..N].rema,partiti/r.[1..N].parti,cenaassieme/r.[1..N].cena}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment