99 bottles of beer: Difference between revisions

Line 4,088:
type NinetynineBottles
int DEFAULT_BOTTLES_COUNT = 99
text BASE_SUBJECT = "bottle"
model
int initialBottlesCount, bottlesCount
Line 4,095 ⟶ 4,094:
me.bottlesCount = bottlesCount
end
fun subject = text by block do return when(me.bottlesCount == 1, BASE_SUBJECT"bottle", BASE_SUBJECT + "sbottles") end
fun bottles = text by block do return when(me.bottlesCount == 0, "No more", text!me.bottlesCount) end
fun goToWall = void by block
218

edits