Sha256: a496fc3581d19d689d1043ff3994305ee6a86b3f97e4acf157ce376d074beea6

Contents?: true

Size: 616 Bytes

Versions: 1

Compression:

Stored size: 616 Bytes

Contents

# Bato Programming Language (https://github.com/jjuliano/bato)

modyul TimeBomb
  BILANG = 5
  klase Bomba
    panuntunan tik
      sabihin 'tik'
    katapusan

    panuntunan tok
      sabihin 'tok'
    katapusan
    
    panuntunan sabog
      sabihin 'kaboom!'
    katapusan
  katapusan
katapusan

pasabog = TimeBomb::Bomba.gumawa

bilang = 1
habang bilang <= TimeBomb::BILANG ganito
	isulat "#{bilang}"

  kapag (bilang == TimeBomb::BILANG)
    pasabog.sabog
  ngunit_kapag_ang (bilang % 2) != 0
    pasabog.tik
  ngunit_kapag_ang (bilang % 2) == 0
    pasabog.tok
  katapusan

  sleep 1
	bilang += 1
katapusan

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bato-0.0.7 mga_halimbawa/timebomb.bato