Commit 648deaff authored by Romain DELEAU's avatar Romain DELEAU

Merge branch 'data_structure' into 'develop'

Data structure

See merge request romain.deleau/rlg-tool!3
parents e901da6c aaf0e810
import { Character } from './character';
describe('Character', () => {
it('should create an instance', () => {
expect(new Character()).toBeTruthy();
});
});
export class Character {
name: string = '';
description: string = '';
}
import { Comment } from './comment';
describe('Comment', () => {
it('should create an instance', () => {
expect(new Comment()).toBeTruthy();
});
});
export class Comment {
content: string = '';
answers: string[] = [];
}
import { EducationnalObjective } from './educationnal-objective';
describe('EducationnalObjective', () => {
it('should create an instance', () => {
expect(new EducationnalObjective()).toBeTruthy();
});
});
export class EducationnalObjective {
objective: string = '';
comments: Comment[] = [];
}
import { GameContext } from './game-context';
describe('GameContext', () => {
it('should create an instance', () => {
expect(new GameContext()).toBeTruthy();
});
});
export class GameContext {
univers: string = '';
support: string = '';
duration: string = '';
intrigue: string = '';
other: string = '';
comments: Comment[] = [];
}
import { GameEducationnalObjective } from './game-educationnal-objective';
describe('GameEducationnalObjective', () => {
it('should create an instance', () => {
expect(new GameEducationnalObjective()).toBeTruthy();
});
});
export class GameEducationnalObjective {
objective: string = '';
comments: Comment[] = [];
}
import { MissionContext } from './mission-context';
describe('MissionContext', () => {
it('should create an instance', () => {
expect(new MissionContext()).toBeTruthy();
});
});
export class MissionContext {
duration: string = '';
intrigue: string = '';
communication = '';
various: string = '';
comments: Comment[] = [];
}
import { Mission } from './mission';
describe('Mission', () => {
it('should create an instance', () => {
expect(new Mission()).toBeTruthy();
});
});
import { EducationnalObjective } from "../educationnal-objective/educationnal-objective";
import { MissionContext } from "../mission-context/mission-context";
import { Role } from "../role/role";
import { Step } from "../step/step";
export class Mission {
educationnalObjective: EducationnalObjective = new EducationnalObjective();
context: MissionContext = new MissionContext();
roles: Role[] = [new Role(), new Role()];
chronologie: Step[] = [new Step()];
}
import { Repeat } from './repeat';
describe('Repeat', () => {
it('should create an instance', () => {
expect(new Repeat()).toBeTruthy();
});
});
export class Repeat {
iteration: number = 0;
while: string = '';
}
import { Ressource } from './ressource';
describe('Ressource', () => {
it('should create an instance', () => {
expect(new Ressource()).toBeTruthy();
});
});
export class Ressource {
name: string = '';
number: string = '';
type: string = '';
}
import { CharacterReward } from './character-reward';
describe('CharacterReward', () => {
it('should create an instance', () => {
expect(new CharacterReward()).toBeTruthy();
});
});
import { Character } from "../../character/character";
import { Reward } from "../reward";
export class CharacterReward implements Reward {
character!: Character;
}
import { ObjectiveReward } from './objective-reward';
describe('ObjectiveReward', () => {
it('should create an instance', () => {
expect(new ObjectiveReward()).toBeTruthy();
});
});
import { Reward } from "../reward";
export class ObjectiveReward implements Reward {
name: string = '';
}
import { ObjectsReward } from './objects-reward';
describe('ObjectsReward', () => {
it('should create an instance', () => {
expect(new ObjectsReward()).toBeTruthy();
});
});
import { Ressource } from "../../ressource/ressource";
import { Reward } from "../reward";
export class ObjectsReward implements Reward{
objects: Ressource[] = [new Ressource()];
}
import { QuestReward } from './quest-reward';
describe('QuestReward', () => {
it('should create an instance', () => {
expect(new QuestReward()).toBeTruthy();
});
});
import { Role } from "../../role/role";
import { Reward } from "../reward";
export class QuestReward implements Reward {
quest!: Role;
}
export interface Reward {
}
import { SkillReward } from './skill-reward';
describe('SkillReward', () => {
it('should create an instance', () => {
expect(new SkillReward()).toBeTruthy();
});
});
import { Ressource } from "../../ressource/ressource";
import { Reward } from "../reward";
export class SkillReward implements Reward {
skill!: Ressource;
}
import { RoleOccurrence } from './role-occurrence';
describe('RoleOccurrence', () => {
it('should create an instance', () => {
expect(new RoleOccurrence()).toBeTruthy();
});
});
export class RoleOccurrence {
iteration: number = 1;
min!: number;
max!:number;
}
import { Role } from './role';
describe('Role', () => {
it('should create an instance', () => {
expect(new Role()).toBeTruthy();
});
});
import { Step } from "../step/step";
import { Task } from "../task/task";
import { Ressource } from "../ressource/ressource";
import { SupplementaryRole } from "../supplementary-role/supplementary-role";
import { Reward } from "../rewards/reward";
import { RoleOccurrence } from "../role-occurrence/role-occurrence";
export class Role {
intitule: string = '';
questName: string = '';
description: string = '';
educationnalObjectives: string[] = [''];
rewards: Reward[] = [];
stuff: string = '';
ressources: Ressource[] = [];
supplementaryRoles: SupplementaryRole[] = [];
comments: Comment[] = [];
occurences: RoleOccurrence[] = [new RoleOccurrence()]
tasks: Task[][] = [
[new Task('normal')]
]
chronologie: Step[] = [];
}
import { Scenario } from './scenario';
describe('Scenario', () => {
it('should create an instance', () => {
expect(new Scenario()).toBeTruthy();
});
});
import { Character } from "../character/character";
import { GameContext } from "../game-context/game-context";
import { GameEducationnalObjective } from "../game-educationnal-objective/game-educationnal-objective";
import { Mission } from "../mission/mission";
import { Ressource } from "../ressource/ressource";
export class Scenario {
educationnalObjective: GameEducationnalObjective = new GameEducationnalObjective();
context: GameContext = new GameContext();
missions: Mission[] = [new Mission()];
characters: Character[] = [];
gameRules: string = '';
ressources: Ressource[] = [new Ressource()];
}
\ No newline at end of file
import { Step } from './step';
describe('Step', () => {
it('should create an instance', () => {
expect(new Step()).toBeTruthy();
});
});
export class Step {
description: string = '';
durarion: number = 1;
durationUnit: string = 'UT';
comments: Comment[] = [];
}
import { SupplementaryRole } from './supplementary-role';
describe('SupplementaryRole', () => {
it('should create an instance', () => {
expect(new SupplementaryRole()).toBeTruthy();
});
});
export class SupplementaryRole {
name: string = '';
color: string = '';
objectives: string = '';
skills: string = '';
rules: string = '';
}
import { Symbol } from './symbol';
describe('Symbol', () => {
it('should create an instance', () => {
expect(new Symbol()).toBeTruthy();
});
});
export class Symbol {
symbol: string = '';
color: string = '';
}
import { Task } from './task';
describe('Task', () => {
it('should create an instance', () => {
expect(new Task()).toBeTruthy();
});
});
import { Character } from "../character/character";
import { Comment } from "../comment/comment";
import { Repeat } from "../repeat/repeat";
import { SupplementaryRole } from "../supplementary-role/supplementary-role";
import { Symbol } from "../symbol/symbol";
export class Task {
type: string; //peut être : normal / annexe / event / optionnal / final / repeater
identifier: string = '';
symbol: Symbol = new Symbol();
objective: string = '';
antecedents: Task[] = [];
duration: number = 1;
durationUnite: string = 'UT';
comments: Comment[] = [];
character!: Character;
repeat: Repeat = new Repeat();
supplementaryRole!: SupplementaryRole;
interrupt: string = '';
constructor(type: string) {
this.type = type;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment