- Archive old documentation and test files to `docs/archive/` and `local_tests/`. - Remove various temporary and old files from the project root. - Add `nekocode-rust` analysis tool and its output files (`nekocode/`, `.nekocode_sessions/`, `analysis.json`). - Minor updates to `apps/chip8_nyash/chip8_emulator.nyash` and `local_tests` files. This commit cleans up the repository and sets the stage for further code modularization efforts, particularly in the `src/interpreter` and `src/parser` modules, based on recent analysis.
27 lines
658 B
Plaintext
27 lines
658 B
Plaintext
# 🌟 birth() テスト - 生命をBoxに与える!
|
||
|
||
box Life {
|
||
init { name, energy }
|
||
|
||
birth(lifeName) { # 生命を誕生させる
|
||
me.name = lifeName
|
||
me.energy = 100
|
||
print("🌟 " + lifeName + " が誕生しました!")
|
||
}
|
||
|
||
introduce() {
|
||
print("私の名前は " + me.name + " です。エネルギーは " + me.energy + " です。")
|
||
return me.name
|
||
}
|
||
}
|
||
|
||
print("=== birth() 構文テスト開始 ===")
|
||
|
||
# birth()コンストラクタでLife作成
|
||
local alice = new Life("Alice")
|
||
alice.introduce()
|
||
|
||
local bob = new Life("Bob")
|
||
bob.introduce()
|
||
|
||
print("=== birth() テスト完了 ===") |