치료토큰
2026년 5월 11일 09:30분
민수기 21장에서 놋뱀을 쳐다보면 뱀에 물려도 살아납니다. 참조 토큰만으로 치료가 완성됩니다. 나는 독의 종류를 받아 해독 토큰을 조회하고 치료 여부를 결정하는 핸들러를 만들었습니다.
package com.jesusbornd.numbers;
import java.util.Map;
public class Numbers_21_Chapter_Lv3 {
static final Map<String, String> TOKENS = Map.of(
"불뱀", "놋뱀_TOKEN",
"전갈", "제사장_TOKEN",
"독초", "물_TOKEN"
);
static void heal(String person, String poison) {
String token = TOKENS.get(poison);
if (token == null) {
System.out.printf("%s → 알 수 없는 독: 치료 불가%n", person);
} else {
System.out.printf("%s(%s) → 토큰[%s] 조회 → ✅ 치료됨%n", person, poison, token);
}
}
public static void main(String[] args) {
heal("이스라엘_01", "불뱀");
heal("이스라엘_02", "불뱀");
heal("이스라엘_03", "독초");
heal("이스라엘_04", "미지독");
}
}
TOKENS = {"불뱀": "놋뱀_TOKEN", "전갈": "제사장_TOKEN", "독초": "물_TOKEN"}
def heal(person, poison):
token = TOKENS.get(poison)
if token:
print(f"{person}({poison}) → 토큰[{token}] 조회 → ✅ 치료됨")
else:
print(f"{person} → 알 수 없는 독: 치료 불가")
if __name__ == "__main__":
heal("이스라엘_01", "불뱀")
heal("이스라엘_02", "불뱀")
heal("이스라엘_03", "독초")
heal("이스라엘_04", "미지독")
Search
Categories
← 목록으로
Comments
바라보는 행위 하나가 치료 완성 조건이라니 단순하면서 강력하네요.