| °ÔÀÓ :: Set. °ÔÀÓ :: SET ¸ðµâÀº ¼¼Æ® °ÔÀÓÀ»À§ÇÑ ±ÔÄ¢À» Æ÷ÇÔÇÕ´Ï´Ù. |
Áö±Ý ´Ù¿î·Îµå |
°ÔÀÓ :: Set. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À̸§:
- Richard Clamp
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~rclamp/
°ÔÀÓ :: Set. ű×
°ÔÀÓ :: Set. ¼³¸í
°ÔÀÓ :: Set Module¿¡´Â ¼³Á¤ °ÔÀÓÀ»À§ÇÑ ±ÔÄ¢ÀÌ µé¾î ÀÖ½À´Ï´Ù. °ÔÀÓ :: ¸ðµâÀº set.synopsis My $ game = games :: set-> new ({deck => })¸¦ Æ÷ÇÔÇÕ´Ï´Ù. $ °ÔÀÓ -> ¼ÅÇÃ; my @ cards = {$ game-> deal} 1..3; # 3 Ä«µå Àμâ $ °ÔÀÓ -> ¼¼Æ® (@ Ä«µå)? "setn": "no setn"; °ÔÀÓ :: ¼¼Æ® Ä«µå °ÔÀÓ ¼¼Æ®ÀÇ ÀϺΠ±ÔÄ¢À» ÀÌÇØÇÕ´Ï´Ù. ¶ÇÇÑ Ç¥ÁØ Deck.methodsnewClass :: Accessor »ó ¼Ó »ý¼ºÀÚ¸¦ »ý¼ºÇÏ´Â ¹æ¹ýÀ» ¾Ë°í ÀÖ½À´Ï´Ù. ÇöÀç µ¦À» »õ·Î ¹½À´Ï´Ù. ¸¹Àº °ÔÀÓÀ» Æ÷ÇÔÇÏ´Â ¹è¿¿¡ ´ëÇÑ ÂüÁ¶ :: set :: card objects.shuffleshuffle deck.standard_deckcalculates Ç¥ÁØ µ¦À» games :: set :: card objects.set·Î Ç¥½ÃÇÕ´Ï´Ù. @ cards Ä«µå°¡ set.find_sets (@ cards)¸¦ ¸¸µé¸é @CardsÀÇ ¸ðµç °¡´ÉÇÑ ¼¼Æ®¸¦ ¹è¿ ÂüÁ¶ ¿ä±¸ »çÇ×À¸·Î ¹ÝȯÇÏ´Â °æ¿ì true¸¦ ¹ÝȯÇÕ´Ï´Ù. ¡¤ Perl.
°ÔÀÓ :: Set. °ü·Ã ¼ÒÇÁÆ®¿þ¾î