Skip to content
This repository was archived by the owner on Sep 17, 2022. It is now read-only.

Commit d5762e3

Browse files
Added templates for all structures
All Structure calls are added to Models and all templates are created ready for implementation.
1 parent 7bb8671 commit d5762e3

19 files changed

+406
-0
lines changed

Assets/Scripts/ARgorithm/Models/Models.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,33 @@ public void Add(string id, string struct_type)
134134
case "variable":
135135
this.Add(id, new VariableStructure());
136136
break;
137+
case "string":
138+
this.Add(id, new StringStructure());
139+
break;
140+
case "stack":
141+
this.Add(id, new StackStructure());
142+
break;
143+
case "queue":
144+
this.Add(id, new QueueStructure());
145+
break;
146+
case "priorityqueue":
147+
this.Add(id, new PriorityQueueStructure());
148+
break;
149+
case "set":
150+
this.Add(id, new SetStructure());
151+
break;
152+
case "vector":
153+
this.Add(id, new VectorStructure());
154+
break;
155+
case "ll":
156+
this.Add(id, new LinkedListStructure());
157+
break;
158+
case "dll":
159+
this.Add(id, new DoublyLinkedListStructure());
160+
break;
161+
case "map":
162+
this.Add(id, new MapStructure());
163+
break;
137164
default:
138165
this.Add(id, new BaseStructure());
139166
break;
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System;
2+
using System.Collections;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using UnityEngine;
6+
using Newtonsoft.Json;
7+
using Newtonsoft.Json.Linq;
8+
9+
using ARgorithm.Models;
10+
using ARgorithm.Animations;
11+
using ARgorithm.Structure.Typing;
12+
13+
namespace ARgorithm.Structure
14+
{
15+
public class DoublyLinkedListStructure : BaseStructure
16+
{
17+
public DoublyLinkedListStructure()
18+
{
19+
20+
}
21+
public override void Operate(State state, GameObject gameObject)
22+
{
23+
base.Operate(state, gameObject);
24+
}
25+
26+
public override void Undo(State state)
27+
{
28+
base.Undo(state);
29+
}
30+
}
31+
}

Assets/Scripts/ARgorithm/Structure/DoublyLinkedListStructure.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System;
2+
using System.Collections;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using UnityEngine;
6+
using Newtonsoft.Json;
7+
using Newtonsoft.Json.Linq;
8+
9+
using ARgorithm.Models;
10+
using ARgorithm.Animations;
11+
using ARgorithm.Structure.Typing;
12+
13+
namespace ARgorithm.Structure
14+
{
15+
public class LinkedListStructure : BaseStructure
16+
{
17+
public LinkedListStructure()
18+
{
19+
20+
}
21+
public override void Operate(State state, GameObject gameObject)
22+
{
23+
base.Operate(state, gameObject);
24+
}
25+
26+
public override void Undo(State state)
27+
{
28+
base.Undo(state);
29+
}
30+
}
31+
}

Assets/Scripts/ARgorithm/Structure/LinkedListStructure.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System;
2+
using System.Collections;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using UnityEngine;
6+
using Newtonsoft.Json;
7+
using Newtonsoft.Json.Linq;
8+
9+
using ARgorithm.Models;
10+
using ARgorithm.Animations;
11+
using ARgorithm.Structure.Typing;
12+
13+
namespace ARgorithm.Structure
14+
{
15+
public class MapStructure : BaseStructure
16+
{
17+
public MapStructure()
18+
{
19+
20+
}
21+
public override void Operate(State state, GameObject gameObject)
22+
{
23+
base.Operate(state, gameObject);
24+
}
25+
26+
public override void Undo(State state)
27+
{
28+
base.Undo(state);
29+
}
30+
}
31+
}

Assets/Scripts/ARgorithm/Structure/MapStructure.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System;
2+
using System.Collections;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using UnityEngine;
6+
using Newtonsoft.Json;
7+
using Newtonsoft.Json.Linq;
8+
9+
using ARgorithm.Models;
10+
using ARgorithm.Animations;
11+
using ARgorithm.Structure.Typing;
12+
13+
namespace ARgorithm.Structure
14+
{
15+
public class PriorityQueueStructure : BaseStructure
16+
{
17+
public PriorityQueueStructure()
18+
{
19+
20+
}
21+
public override void Operate(State state, GameObject gameObject)
22+
{
23+
base.Operate(state, gameObject);
24+
}
25+
26+
public override void Undo(State state)
27+
{
28+
base.Undo(state);
29+
}
30+
}
31+
}

Assets/Scripts/ARgorithm/Structure/PriorityQueueStructure.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System;
2+
using System.Collections;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using UnityEngine;
6+
using Newtonsoft.Json;
7+
using Newtonsoft.Json.Linq;
8+
9+
using ARgorithm.Models;
10+
using ARgorithm.Animations;
11+
using ARgorithm.Structure.Typing;
12+
13+
namespace ARgorithm.Structure
14+
{
15+
public class QueueStructure : BaseStructure
16+
{
17+
public QueueStructure()
18+
{
19+
20+
}
21+
public override void Operate(State state, GameObject gameObject)
22+
{
23+
base.Operate(state, gameObject);
24+
}
25+
26+
public override void Undo(State state)
27+
{
28+
base.Undo(state);
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)