Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
1

How do I get the game to end? in ruby

ComputingSquid
ComputingSquid

like, do i just put nil? i don't think it works. because the only other way i know is to make a game inside one big loop and then make conditions to exit the loop then say, you died. to bad for you.

2 years ago

Voters

Comments

TopNew
1
mwilki7
mwilki7

try the exit function:

exit 1

https://www.rubyguides.com/2019/03/ruby-exit/

2 years ago
1
ComputingSquid
ComputingSquid

@mwilki7
i'll try

2 years ago
Load more