数式を使うことでコードが減らせることができます。
3か所のお雛様出現座標の計算を計算式と一つの変数で表現することにより、
コード数が減りすっきりした1行のコードにすることができます。
ただ、メンテナンス性が落ちるので、変更したときに新たな数式を
考える必要はあります。
By using a mathematical formula, you can reduce the amount of code.
The three spawn positions of Ohina-sama can be calculated using a single formula and one cariable, which allows the logic to be written in a single, clean line of code.
However, this approach may reduce maintainablility. If changes are required later, a new formula must be designed and carefully reconsidered.
次回