- Shop.luau: 손님·주문·조리·서빙·구매 순수 로직(lune 단위 테스트, 시뮬레이터 공용) - 서버: World(부지 6칸), PlotBuilder(파트 모형), PlotController, Npc(트윈 이동), Data(ProfileStore), Receipts(결제 1회 = 지급 1회), Game - 클라이언트: Hud(돈·다음 업그레이드·목록·결제·언어·튜토리얼), 내 조리대 전용 버튼, 튜토리얼 화살표, 주인 전용 테스트 버튼 - 2단계 업그레이드 10개 추가, 파이썬 시뮬레이터를 실제 로직 기반 tools/sim.luau로 교체 - tools/cloud.py: 업로드, 원격 Luau 실행, 게임패스·개발자 상품 생성, 서버 인원 설정 - tests/cloud/integration.luau: 로블록스 서버 통합 테스트 514개 통과 - check.sh에 luau-lsp 타입 검사 추가, ProfileStore 고정 버전 포함 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
906 B
Lua
32 lines
906 B
Lua
-- 봇 플레이로 구매 시점 목표를 검사: lune run tests/Sim.spec.luau
|
|
local Sim = require("../tools/simlib")
|
|
local T = require("./check")
|
|
|
|
local function at(log, id)
|
|
for _, e in log do
|
|
if e.id == id then
|
|
return e.t
|
|
end
|
|
end
|
|
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 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초 이하`)
|
|
end
|
|
prev = e.t
|
|
end
|
|
|
|
local x2 = Sim.run(2, 3600)
|
|
T.check(at(x2, "Expand") < at(base, "Expand") * 0.65, "2배 수익이면 확장이 훨씬 빠름")
|
|
|
|
T.done("Sim.spec")
|