Typo and Deleting unused code
All checks were successful
E2E Testing / test (push) Successful in 1m36s
All checks were successful
E2E Testing / test (push) Successful in 1m36s
This commit is contained in:
parent
b18b06e093
commit
b4abd43bc0
@ -1,34 +0,0 @@
|
|||||||
import {SimpleGamesystem} from "./SimpleGamesystem";
|
|
||||||
import {TemplateState} from "./states/TemplateState";
|
|
||||||
import {SimpleState} from "./states/SimpleState";
|
|
||||||
import {ScriptAccountCondition} from "./conditions/ScriptAccountCondition";
|
|
||||||
import {SimpleTransition} from "./transitions/SimpleTransition";
|
|
||||||
import {ScriptAccountAction} from "./actions/ScriptAccountAction";
|
|
||||||
|
|
||||||
export class TemplateGamesystem {
|
|
||||||
referenceGamesystem: SimpleGamesystem
|
|
||||||
|
|
||||||
templateStates: SimpleState[] = []
|
|
||||||
templateTransitions: SimpleTransition[] = []
|
|
||||||
|
|
||||||
|
|
||||||
constructor(referenceGamesystem: SimpleGamesystem) {
|
|
||||||
this.referenceGamesystem = referenceGamesystem;
|
|
||||||
}
|
|
||||||
|
|
||||||
addReferenceState(referenceState: SimpleState) {
|
|
||||||
const templateState = new SimpleState(referenceState.stateLabel, referenceState.stateDescription);
|
|
||||||
templateState.conditions = referenceState.conditions.map(condition =>
|
|
||||||
ScriptAccountCondition.constructScriptAccountCondition(condition.scriptAccount, condition.minValue, condition.maxValue)!)
|
|
||||||
this.templateStates.push(templateState)
|
|
||||||
}
|
|
||||||
|
|
||||||
addReferenceTransition(referenceTransition: SimpleTransition) {
|
|
||||||
const templateTransition = new SimpleTransition(referenceTransition.startingState, referenceTransition.endingState)
|
|
||||||
templateTransition.scriptAccountConditions = referenceTransition.scriptAccountConditions.map(condition =>
|
|
||||||
ScriptAccountCondition.constructScriptAccountCondition(condition.scriptAccount, condition.minValue, condition.maxValue)!)
|
|
||||||
templateTransition.scriptAccountActions = referenceTransition.scriptAccountActions.map(action =>
|
|
||||||
new ScriptAccountAction(action.scriptAccount, action.changingValue))
|
|
||||||
this.templateTransitions.push(templateTransition)
|
|
||||||
}
|
|
||||||
}
|
|
@ -10,7 +10,7 @@ import {Transition} from "../transitions/Transition";
|
|||||||
import {ScriptAccountAction} from "../actions/ScriptAccountAction";
|
import {ScriptAccountAction} from "../actions/ScriptAccountAction";
|
||||||
import {AbstractProductGamesystemGenerator} from "./AbstractProductGamesystemGenerator";
|
import {AbstractProductGamesystemGenerator} from "./AbstractProductGamesystemGenerator";
|
||||||
|
|
||||||
export class ProductGamesystemGenerator extends AbstractProductGamesystemGenerator{
|
export class ProductGamesystemGenerator extends AbstractProductGamesystemGenerator {
|
||||||
|
|
||||||
|
|
||||||
protected generateBinaryProductTransition(startingState: ProductState, endingState: ProductState, usedTransition: Transition<any>, generatedTransitions: ProductTransition[]) {
|
protected generateBinaryProductTransition(startingState: ProductState, endingState: ProductState, usedTransition: Transition<any>, generatedTransitions: ProductTransition[]) {
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
import {Transition} from "../transitions/Transition";
|
|
||||||
import {SimpleState} from "./SimpleState";
|
|
||||||
import {ScriptAccountCondition} from "../conditions/ScriptAccountCondition";
|
|
||||||
|
|
||||||
export class TemplateState {
|
|
||||||
referenceState: SimpleState
|
|
||||||
conditions: ScriptAccountCondition[]
|
|
||||||
|
|
||||||
|
|
||||||
constructor(referenceState: SimpleState, conditions: ScriptAccountCondition[]) {
|
|
||||||
this.referenceState = referenceState;
|
|
||||||
this.conditions = conditions;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user