Files
hakorune/local_tests/test_birth_simple.nyash
Moe Charm ef7a0de3b0 feat: Prepare for code modularization and cleanup
- 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.
2025-08-16 01:30:39 +09:00

27 lines
658 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 🌟 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() テスト完了 ===")