-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Cure.peace.pikarin_janken (singleton method) #39
Changes from all commits
a3b54c4
cf23def
4795b51
fe5eb71
aed2b52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,25 @@ def self.method_missing(name, *args) | |
super | ||
end | ||
end | ||
|
||
[Cure.peace, Cure.cure_peace].each do |peace| | ||
class << peace | ||
HANDS = | ||
(['グー'] * 13) + | ||
(['チョキ'] * 14) + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
(['パー'] * 15) + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
['グッチョッパー'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
MESSAGE = <<EOF | ||
ピカピカピカリン | ||
ジャンケンポン! | ||
(%s) | ||
EOF | ||
def pikarin_janken | ||
print_by_line(MESSAGE % HANDS.sample) | ||
end | ||
alias janken pikarin_janken | ||
end | ||
end | ||
end | ||
|
||
module Shiny | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.