Skip to content

Instantly share code, notes, and snippets.

@noqisofon
Created July 19, 2023 13:54
Show Gist options
  • Save noqisofon/cec62bd7105da60e16ea414a61be1c6c to your computer and use it in GitHub Desktop.
Save noqisofon/cec62bd7105da60e16ea414a61be1c6c to your computer and use it in GitHub Desktop.
( ノ╹◡◡╹)ノ 無限にねこを購入するコードだと思う
def not_enough_cats?
true
end
def buy_cat()
purchases = rand(6) + 1
puts "ねこを #{purchases} 匹購入しました。"
end
while true
if not_enough_cats? then
buy_cat()
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment