質問するログイン新規登録

回答編集履歴

1

partial file

2015/08/07 06:08

投稿

hello-world
hello-world

スコア1342

answer CHANGED
@@ -38,17 +38,20 @@
38
38
  str + clv
39
39
  end
40
40
  end
41
+ ```
41
42
 
42
-
43
+ ```lang-ruby
43
44
  f = Fighter.new(100, 100)
44
45
  w = Wizard.new(100, 100)
45
46
  p = Priest.new(100, 100)
46
47
 
48
+ puts "--- 従来の戦闘計算"
49
+
47
50
  puts f.battle(w)
48
51
  puts w.battle(p)
49
52
  puts p.battle(f)
50
53
 
51
- puts "==================="
54
+ puts "--- 新しい戦闘計算"
52
55
 
53
56
  puts Game.battle(f, w)
54
57
  puts Game.battle(w, p)