From: Josh Rowe Date: 2011-01-21T18:44:22+09:00 Subject: Re: Deleting from hashes Thank you all, now for the issue of that being an array. I made a mistake in which code to copy and paste. This is the hash card1 = {:name => "Celtic guardian", :type => "monster", :atk => 1400, :def => 1200, :level => 4} card2 = {:name => "Dark Magician", :type => "monster", :atk => 2500, :def => 2100, :level => 7} $deck = [card1,card2] def draw draw = rand($deck.size) puts "you drew the card #{$deck[draw].name}" $deck.delete(draw) end draw This is what I think it should look like. What do you all think regarding using arrays or hashes in my card game? Any thoughts would be appreciated. Regards Joshua -- Posted via http://www.ruby-forum.com/.