だから私はハッシュのハッシュを持っています....
@win_moves = {
:wm01 => {:a1=>"X", :a2=>" ", :a3=>" ", :b1=>" ", :b2=>"X", :b3=>" ", :c1=>" ", :c2=>" ", :c3=>"X"},
:wm02 => {:a1=>" ", :a2=>"X", :a3=>" ", :b1=>" ", :b2=>"X", :b3=>" ", :c1=>" ", :c2=>"X", :c3=>" "},
:wm03 => {:a1=>" ", :a2=>" ", :a3=>"X", :b1=>" ", :b2=>"X", :b3=>" ", :c1=>"X", :c2=>" ", :c3=>" "},
:wm04 => {:a1=>" ", :a2=>" ", :a3=>" ", :b1=>"X", :b2=>"X", :b3=>"X", :c1=>" ", :c2=>" ", :c3=>" "},
:wm05 => {:a1=>"X", :a2=>"X", :a3=>"X", :b1=>" ", :b2=>" ", :b3=>" ", :c1=>" ", :c2=>" ", :c3=>" "},
:wm06 => {:a1=>" ", :a2=>" ", :a3=>" ", :b1=>" ", :b2=>" ", :b3=>" ", :c1=>"X", :c2=>"X", :c3=>"X"}
}
そして、私はそのようなハッシュを取りたい..
@thegrid = {:a1=>"X", :a2=>"O", :a3=>" ", :b1=>"O", :b2=>"X", :b3=>" ", :c1=>" ", :c2=>" ", :c3=>"X"}
X 値の以前のハッシュ @win_moves と比較して、@win_moves[0] (この場合の答え) で正の一致が得られるようにします... X の存在を確認する必要があります。
正しい方向に私を向けることができますか?