SpaceNinjaServer/src/controllers/api/getNewRewardSeedController.ts
Ordis bf7fd42198
All checks were successful
Build / build (18) (push) Successful in 39s
Build / build (22) (push) Successful in 1m1s
Build / build (20) (push) Successful in 1m12s
Build Docker image / docker (push) Successful in 30s
feat: tutorial and natural new player experience (#983)
Reviewed-on: #983
Co-authored-by: Ordis <134585663+OrdisPrime@users.noreply.github.com>
Co-committed-by: Ordis <134585663+OrdisPrime@users.noreply.github.com>
2025-02-22 11:10:52 -08:00

12 lines
368 B
TypeScript

import { RequestHandler } from "express";
export const getNewRewardSeedController: RequestHandler = (_req, res) => {
res.json({ rewardSeed: generateRewardSeed() });
};
export function generateRewardSeed(): number {
const min = -Number.MAX_SAFE_INTEGER;
const max = Number.MAX_SAFE_INTEGER;
return Math.floor(Math.random() * (max - min + 1)) + min;
}