Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ももたろう

terahide
September 06, 2014

 ももたろう

2014/09/06に行われたXP祭り2014 のLTの資料です。
当日は英語でプレゼンテーションを行いました

terahide

September 06, 2014
Tweet

More Decks by terahide

Other Decks in Programming

Transcript

  1. def "ももたろうのストーリー"(){ Calendar cal = Calendar.instance cal.add(Calendar.YEAR, -400) def uncle,aunt

    Location.set(Japan,aDeepForest)//TODO a village? uncle = PersonFactory.newInstance() aunt = PersonFactory.newInstance() uncle.move(new Location(20,30),100)//mountain while(true){ Branch b = getBranch() if( b == null){ break; } uncle.pickup(b) } aunt.move(new Location(-30,0),-40)//river for(i=0;i<23;i++){ Clothes c = getClothes (i); aunt.wash(c) } River.flow(new RiverHandler(aunt){ def "catch"(donbrako,aunt){ peach = (Peach)donbrako aunt.keep(peach) } }) def momotaro try{ aunt.cutPeach() }catch(PeachSelfSplitedException e){ momotaro = e.birth } } }
  2. def "ももたろうのストーリー"(){ aLongLongTimeAgo() aDeepForest() def [uncle,aunt] = live() uncle.goMountain() uncle.pickUpBranch(allArround())

    aunt.goRiver() aunt.washClothes() eventAtRiver(aunt) def momotaro = birth(aunt.getKeepedPeach) } def eventAtRiver(aunt){ River.flow(new RiverHandler(aunt){ def "catch"(donbrako,aunt){ peach = (Peach)donbrako aunt.keep(peach) } }) } def birth(peach){ def momotaro try{ aunt.cutPeach(new CutPeachHandler(){ def handle(peach){ momotaro = peach.birth } })