ConceptCreator/src/app/game-model/gamesystems/State.ts
Sebastian Böckelmann 9462de256b
All checks were successful
E2E Testing / test (push) Successful in 1m27s
Visualize SimpleStates of Simplegamesystems
2024-02-10 11:03:26 +01:00

33 lines
688 B
TypeScript

import {Transition} from "./Transition";
export abstract class State<T extends Transition<any>> {
stateLabel: string = "";
stateDescription: string = "";
incomingTransitions: T[] =[];
outgoingTransitions: T[] =[];
initial: boolean = false;
constructor(stateLabel: string, stateDescription: string) {
this.stateLabel = stateLabel;
this.stateDescription = stateDescription;
}
addIncomingTransition(transition: T) {
this.incomingTransitions.push(transition);
}
addOutgoingTransition(transition: T) {
this.outgoingTransitions.push(transition);
}
removeIncomingTransition(transition: T) {
}
removeOutgoingTransition(transition: T) {
}
}