Created
July 25, 2016 05:01
-
-
Save Arakaki-Yuji/2be1b4cc7c9c3d83b8cf1bce53a21abc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 簡単なプログラミング問題でトランプソートというのを考えた。(というかもうありそう) | |
// トランプ1枚のデータ構造はtypeとnumberをキーに持つobject | |
SampleTrunmpCard = { "type" => "heart", number => 1 }; | |
// typeは"heart"、"diamond", "club", "spade"の4種類 | |
// numberは1~13まである。 | |
// トランプの数は合計52枚 | |
// ランダムに並べられているトランプをheartの1~>13,diamondの1~>13,clubの1~>13,spadeの1~>13の順になるように並び替える。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment