fix the sequence of parameters
diff --git a/04_holy_knight.rb b/04_holy_knight.rb
index 6f2bb1a..a4f94d2 100644
--- a/04_holy_knight.rb
+++ b/04_holy_knight.rb
@@ -2,7 +2,7 @@
attr_accessor :hp, :name # 設定物件外部可以直接使用和修改 name 和 hp 的 attributes
- def initialize(name,ap,hp)
+ def initialize(name, hp, ap)
@name = name # 設定一個名為 name(名稱)的 attribute
@hp = hp # 設定一個名為 hp(生命值)的 attribute
@ap = ap # 設定一個名為 ap(攻擊值)的 attribute
diff --git a/05_mage.rb b/05_mage.rb
index 4783bb2..f2f5877 100644
--- a/05_mage.rb
+++ b/05_mage.rb
@@ -2,7 +2,7 @@
attr_accessor :hp, :name # 設定物件外部可以直接使用和修改 name 和 hp 的 attributes
- def initialize(name,ap,hp)
+ def initialize(name, hp, ap)
@name = name # 設定一個名為 name(名稱)的 attribute
@hp = hp # 設定一個名為 hp(生命值)的 attribute
@ap = ap # 設定一個名為 ap(攻擊值)的 attribute
@@ -44,7 +44,7 @@
attr_accessor :hp, :name # 讓外部的 method 也可以抓到這兩個 variables
- def initialize(name,ap,hp)
+ def initialize(name, hp, ap)
@name = name
@hp = hp
@ap = ap