wip(bunsik): 경제 개편 공용 로직 — 업그레이드 갈래, 의자·테이블 배치와 길 찾기(Floor), 알바생 역할·시급, 손님 러시·홍보·쫓아내기 로직, 서버↔클라이언트 약속(NETWORK.md)

서버·클라이언트는 다음 커밋에서 새 구조로 옮깁니다(이 커밋만으로는 빌드 검사가 통과하지 않음).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-14 01:19:40 +09:00
parent 8d29656aa3
commit 52668f219a
12 changed files with 2180 additions and 346 deletions

View File

@@ -11,21 +11,23 @@ local function at(log, id)
return math.huge
end
local base = Sim.run(1, 3600)
T.eq(#base, 20, "봇이 1시간 안에 20개 모두 삼")
T.check(at(base, "Table2") <= 10, "첫 구매 10초 안")
T.check(at(base, "Expand") >= 8 * 60 and at(base, "Expand") <= 12 * 60, "실내 확장 8~12분")
local base = Sim.run(1, 7200)
T.check(#base >= 30, "봇이 2시간 안에 30번 넘게 삼(업그레이드가 잘게 나뉨)")
T.check(base[1].t <= 10, "첫 구매 10초 안")
T.check(at(base, "Stage1") >= 8 * 60 and at(base, "Stage1") <= 16 * 60, "실내 확장 8~16분")
T.check(at(base, "Stage2") >= 40 * 60 and at(base, "Stage2") <= 70 * 60, "2층 40~70분")
T.check(at(base, "Staff1") < at(base, "Stage1"), "알바생 기능은 확장 전에 열림")
local prev = 0
for i, e in base do
if i > 1 and i <= 10 then
T.check(e.t - prev <= 100, `1단계 #{i} 구매 간격 100초 이하`)
elseif i > 10 then
T.check(e.t - prev <= 180, `2단계 #{i} 구매 간격 180초 이하`)
if i > 1 and e.t < at(base, "Stage1") then
T.check(e.t - prev <= 100, `1단계 #{i} {e.id} 구매 간격 100초 이하`)
elseif i > 1 then
T.check(e.t - prev <= 240, `#{i} {e.id} 구매 간격 4분 이하`)
end
prev = e.t
end
local x2 = Sim.run(2, 3600)
T.check(at(x2, "Expand") < at(base, "Expand") * 0.65, "2배 수익이면 확장이 훨씬 빠름")
local x2 = Sim.run(2, 7200)
T.check(at(x2, "Stage1") < at(base, "Stage1") * 0.65, "2배 수익이면 확장이 훨씬 빠름")
T.done("Sim.spec")