ももたろう
-
Upload
terahide -
Category
Engineering
-
view
794 -
download
2
description
Transcript of ももたろう
昔々あるところにお爺さんとお婆さんがいました。働き者の二人は朝は日の昇る前の暗いうちから、夜は日が暮れて暗くなるまで毎日毎日働いて暮らしていました。それでも二人の暮らしは貧しく日々暮らしていくのが精いっぱいでした。ある日、お爺さんは山に芝刈りへ、お婆さんは川に洗濯へ出かけました。お婆さんが川で洗濯をしていると、川の上流から何かが流れてくるではありませんか。なんと大きな桃がどんぶらこ、どんぶらこと流れてきました。お婆さんは川にはいり桃を拾うと「まぁなんて大きな桃だべや。おじいさんと一緒に食べることにしましょうかねー」と桃をしょって帰りました。山から戻ってきたお爺さんと一緒に桃を切ろうとすると、桃はひとりでに「ぱかーん」と割れ、中から桃子が飛び出てきました。
def "ももたろうのストーリー"(){Calendar cal = Calendar.instancecal.add(Calendar.YEAR, -400)def uncle,auntLocation.set(Japan,aDeepForest)//TODO a village?uncle = PersonFactory.newInstance()aunt = PersonFactory.newInstance()uncle.move(new Location(20,30),100)//mountainwhile(true){Branch b = getBranch()if( b == null){
break;}uncle.pickup(b)
}
aunt.move(new Location(-30,0),-40)//riverfor(i=0;i<23;i++){Clothes c = getClothes (i);aunt.wash(c)}
River.flow(new RiverHandler(aunt){def "catch"(donbrako,aunt){peach = (Peach)donbrakoaunt.keep(peach)}})
def momotarotry{aunt.cutPeach()
}catch(PeachSelfSplitedException e){momotaro = e.birth
}}}
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)donbrakoaunt.keep(peach)}
})}def birth(peach){def momotarotry{aunt.cutPeach(new CutPeachHandler(){def handle(peach){momotaro = peach.birth
}})
}