This commit is contained in:
Snarling
2022-09-06 09:07:12 -04:00
parent cc2246213f
commit 83d357e758
203 changed files with 2263 additions and 3018 deletions
+10 -16
View File
@@ -6,18 +6,12 @@ import AccordionDetails from "@mui/material/AccordionDetails";
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
import Typography from "@mui/material/Typography";
import { IPlayer } from "../../PersonObjects/IPlayer";
import { Player } from "../../Player";
import { Adjuster } from "./Adjuster";
import { IEngine } from "../../IEngine";
// Update as additional BitNodes get implemented
interface IProps {
player: IPlayer;
engine: IEngine;
}
export function Entropy(props: IProps): React.ReactElement {
export function Entropy(): React.ReactElement {
return (
<Accordion TransitionProps={{ unmountOnExit: true }}>
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
@@ -28,20 +22,20 @@ export function Entropy(props: IProps): React.ReactElement {
label="Set entropy"
placeholder="entropy"
add={(num) => {
props.player.entropy += num;
props.player.applyEntropy(props.player.entropy);
Player.entropy += num;
Player.applyEntropy(Player.entropy);
}}
subtract={(num) => {
props.player.entropy -= num;
props.player.applyEntropy(props.player.entropy);
Player.entropy -= num;
Player.applyEntropy(Player.entropy);
}}
tons={() => {
props.player.entropy += 1e12;
props.player.applyEntropy(props.player.entropy);
Player.entropy += 1e12;
Player.applyEntropy(Player.entropy);
}}
reset={() => {
props.player.entropy = 0;
props.player.applyEntropy(props.player.entropy);
Player.entropy = 0;
Player.applyEntropy(Player.entropy);
}}
/>
</AccordionDetails>