Function
DesktopSimulatorPanel
({
challenge,
cells,
simCellId,
simPosition,
simCellInside,
simMineCount,
stepM,
rotationDeg,
message,
onMove,
onStepChange,
onRotationChange,
onReset,
onClear,
onCopy,
}: {
challenge: Challenge;
cells: ChallengeCell[];
simCellId: string;
simPosition: { lat: number; lng: number } | null;
simCellInside: boolean;
simMineCount: number;
stepM: number;
rotationDeg: number;
message: string;
onMove: (direction: SimDirection) => void;
onStepChange: (meters: number) => void;
onRotationChange: (degrees: number) => void;
onReset: () => void;
onClear: () => void;
onCopy: () => void;
})
Source from the content-addressed store, hash-verified
| 1161 | } |
| 1162 | |
| 1163 | function DesktopSimulatorPanel({ |
| 1164 | challenge, |
| 1165 | cells, |
| 1166 | simCellId, |
| 1167 | simPosition, |
| 1168 | simCellInside, |
| 1169 | simMineCount, |
| 1170 | stepM, |
| 1171 | rotationDeg, |
| 1172 | message, |
| 1173 | onMove, |
| 1174 | onStepChange, |
| 1175 | onRotationChange, |
| 1176 | onReset, |
| 1177 | onClear, |
| 1178 | onCopy, |
| 1179 | }: { |
| 1180 | challenge: Challenge; |
| 1181 | cells: ChallengeCell[]; |
| 1182 | simCellId: string; |
| 1183 | simPosition: { lat: number; lng: number } | null; |
| 1184 | simCellInside: boolean; |
| 1185 | simMineCount: number; |
| 1186 | stepM: number; |
| 1187 | rotationDeg: number; |
| 1188 | message: string; |
| 1189 | onMove: (direction: SimDirection) => void; |
| 1190 | onStepChange: (meters: number) => void; |
| 1191 | onRotationChange: (degrees: number) => void; |
| 1192 | onReset: () => void; |
| 1193 | onClear: () => void; |
| 1194 | onCopy: () => void; |
| 1195 | }) { |
| 1196 | const previewProgress = cells.length ? simMineCount / cells.length : 0; |
| 1197 | |
| 1198 | return ( |
| 1199 | <aside className="panel simulatorPanel"> |
| 1200 | <div className="simulatorTitle"> |
| 1201 | <Smartphone size={19} /> |
| 1202 | <div> |
| 1203 | <strong>桌面测试器</strong> |
| 1204 | <span>本地预览,不保存到挑战榜。</span> |
| 1205 | </div> |
| 1206 | </div> |
| 1207 | <div className="simulatorStats"> |
| 1208 | <div> |
| 1209 | <strong>{cells.length}</strong> |
| 1210 | <span>总格子</span> |
| 1211 | </div> |
| 1212 | <div> |
| 1213 | <strong>{simMineCount}</strong> |
| 1214 | <span>预览点亮</span> |
| 1215 | </div> |
| 1216 | <div> |
| 1217 | <strong>{pct(previewProgress)}</strong> |
| 1218 | <span>预览进度</span> |
| 1219 | </div> |
| 1220 | </div> |
Callers
nothing calls this directly
Tested by
no test coverage detected