2011-07-16から1日間の記事一覧

ゲームを書いてみる

scene = 'opening' while true case scene when 'opening' puts '3本の分かれ道があります。どの道を進みますか。' puts " 1 左の道" puts " 2 真ん中の道" puts " 3 右の道" input_value = gets case input_value.to_i when 1 scene = 'left' when 2 scene…

ゲームを書いてみる その2

うまくいかない…なんでだろう これでどうですか? scene = 'opening' while true case scene when 'opening' puts '3本の分かれ道があります。どの道を進みますか。' puts " 1 左の道" puts " 2 真ん中の道" puts " 3 右の道" input_value = gets case input…