ESM アジャイル事業部 開発者ブログ

永和システムマネジメント アジャイル事業部の開発者ブログです。

Ruby Method Karuta : English Instruction Manual

About Ruby Method Karuta

Karuta is a traditional Japanese card game that involves matching cards. The game consists of two sets of cards: reading cards and grabbing cards. In Ruby Method Karuta, reading cards contain descriptions of Ruby methods, while the grabbing cards have the names of the methods that match the descriptions on the reading cards. The content written on the reading card is read aloud, and players quickly grab the corresponding grabbing card. The player who collects the most grabbing card is the winner.

Number of players: 3 or more Playtime: 15-30 minutes

Contents (Card Set)

  • Reading cards (cards with method descriptions): 50 cards
  • Grabbing cards (cards with class and method names corresponding to each reading card): 50 cards
  • Recruitment advertisement: 1 card
  • Instruction manual

Card Descriptions

Target Methods

The target methods are from the built-in library of Ruby 3.2.

Reading Cards

The reading cards are in Japanese, but you can access an English translation of them online at the following URL. https://blog.agile.esm.co.jp/entry/ruby-method-karuta-reading-cards

image.png (136.0 kB)

The reading cards contain the following information: - クラス名(Class name) - 引数(Arguments) - 戻り値(Return value) - 説明(Description) - 答(Answer)

This information is based on specific use cases when calling the method. Please note that not all possible "arguments," "return values," and "descriptions" for the target method are described.

クラス名(Class Name)

The name of the class in which the target method is defined.

引数(Arguments)

The types of arguments (variable-length arguments, block arguments) and the objects taken as arguments. If no arguments are taken, "none" is written.

戻り値(Return Value)

The value returned by the method when called.

説明(Description)

The effect when the method is called with the specified arguments.

答(Answer)

The method name to be grabbed on the grabbing card.

Grabbing Cards

image.png (102.6 kB)

The grabbing cards are written in the format Class name[Symbol]Method name. For methods with a long name spanning multiple lines, the format is:

Class name[::]
Class name[Symbol]
Method name

Class Name

Represents the class in which the corresponding method is defined. If there is a class scope, it is represented with ::.

Symbol

There are three types of symbols:

  • #: Represents an instance method of the class.
  • .: Represents a singleton method of the class.
  • .#: Represents a module method of the class.

How to Play

Assign Roles

Choose one person to read the reading cards (hereinafter referred to as the reader). The remaining players become grabbers who take grabbing cards according to the reader's reading.

Secure a Place and Prepare

Ensure safety and choose a spacious location. In a spacious area (hereinafter referred to as the field), shuffle the 50 reading cards and 50 grabbing cards separately. Stack the reading cards face down to create a deck, and place it near the reader. Place the grabbing cards face up randomly on the field. The grabbers sit around the grabbing cards, and the game begins.

Starting and Ending Conditions of The Game

The reader turns over one card from the reading card deck so that the grabbers cannot see it and reads the contents in order from the top. Grabbers determine the corresponding method and touch the grabbing card on the field. If multiple players touch a grabbing card, the fastest player can take the card. This continues for one turn. The game ends when there are no more grabbing cards on the field.

Fault

Grabbers can only touch a grabbing card once per turn. In other words, if a player touches a card with the wrong answer, it is considered a fault. Players who make a fault cannot take any action until another grabber takes the correct grabbing card, resulting in a one-turn break. After sitting out for one turn, players can continue grabbing cards as usual. If all players are in a fault state, the break will be lifted so that game can continue as usual.

Determining the Winner

At the end of the game, the grabber with the most grabbing cards wins. If there is a tie, try to reach a peaceful resolution (e.g., using Array#sample to decide the winner).

Extra Edition

For those who find the standard rules unsatisfying, try challenging yourself by arranging the rules. Here is an example:

Arranging the Reading Order

This is a way to play by intentionally limiting the information from the reading cards. Instead of reading the reading cards in order from the top, read them in a specific order.

For example, you can play by reading from the Description section. Although it is impossible to uniquely select a grabbing card from the reading card's information, the game becomes more interesting if you are willing to risk a fault to grab a card. The reader can provide additional information when all players are unable to guess and pick up any grabbing cards. Enjoy the fast-paced game as you try to grab cards with as little information as possible.

Feel free to come up with your own arrangements and have fun.

Special Thanks

  • Ruby Reference Manual^1
  • Official Ruby Logo Copyright (C) 2011 The Ruby Association1

The following members selected Ruby methods for the karuta:

  • @a_matsuda
  • @colorbox
  • @fugakkbn
  • @haruguchi
  • @ima1zumi
  • @junk0612
  • @kasumi8pon
  • @koic
  • @swamp09
  • @wai-doi

Contact

ESM, Inc. Agile Div. https://agile.esm.co.jp