-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContentGraph.java
More file actions
109 lines (90 loc) · 3.2 KB
/
ContentGraph.java
File metadata and controls
109 lines (90 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
import java.util.*;
import javafoundations.*;
import Jama.*;
import ciphers.Cipher;
import ciphers.CaesarCipher;
import ciphers.VigenereCipher;
import ciphers.AffineCipher;
import ciphers.HillCipher;
public class ContentGraph {
private Level rome, tuscany, venice, quad, tupelo, hoop, tunnels, clapp;
private AdjMatGraphPlus<Level> gameGraph;
public ContentGraph () {
CaesarCipher cc = new CaesarCipher(3);
rome = new Level(cc, "Content/Ancient_Rome.txt", "Ancient Rome", "Beware of the Ides of March");
VigenereCipher vc = new VigenereCipher("Wendy");
tuscany = new Level(vc, "Content/Tuscany.txt", "Tuscany", "The Medici family kills all who protest to their power");
venice = new Level(vc, "Content/Venice.txt", "Venice", "The pirates attacked our ship We need reinforcements");
AffineCipher ac = new AffineCipher(9, 3, 3);
quad = new Level(ac, "Content/Academic_Quad_1940.txt", "Academic Quad 1940", "Storm the tower First person to the top gets ice cream");
tupelo = new Level(ac, "Content/Tupelo_Lane_May_1,_1940.txt", "Tupelo Lane May 1 1940", "Martha Attridge");
hoop = new Level(ac, "Content/Caf_Hoop_1981.txt", "Caf Hoop 1981", "Make Nachos");
tunnels = new Level(ac, "Content/Wellesley_Tunnels_1990.txt", "Wellesley Tunnels 1990", "Watch out there is asbestos");
double[][] k = new double[2][2];
k[0][0] = 9;
k[0][1] = 6;
k[1][0] = 6;
k[1][1] = 5;
Matrix key = new Matrix(k);
double[][] shift = new double[2][1];
Matrix shiftVal = new Matrix(shift);
double[][] inv = new double[2][2];
inv[0][0] = 15;
inv[0][1] = 8;
inv[1][0] = 8;
inv[1][1] = 1;
Matrix keyInv = new Matrix(inv);
HillCipher hc = new HillCipher(key, shiftVal, keyInv);
clapp = new Level(hc, "Content/Clapp_Library.txt", "Clapp Library", "GOOD LUCK ON FINALS");
gameGraph = new AdjMatGraphPlus<Level>();
gameGraph.addVertex(rome);
gameGraph.addVertex(tuscany);
gameGraph.addVertex(venice);
gameGraph.addVertex(quad);
gameGraph.addVertex(tupelo);
gameGraph.addVertex(hoop);
gameGraph.addVertex(tunnels);
gameGraph.addVertex(clapp);
gameGraph.addArc(rome, tuscany);
gameGraph.addArc(rome, venice);
gameGraph.addArc(tuscany, quad);
gameGraph.addArc(tuscany, tupelo);
gameGraph.addArc(tuscany, hoop);
gameGraph.addArc(tuscany, tunnels);
gameGraph.addArc(venice, quad);
gameGraph.addArc(venice, tupelo);
gameGraph.addArc(venice, hoop);
gameGraph.addArc(venice, tunnels);
gameGraph.addArc(quad, clapp);
gameGraph.addArc(tupelo, clapp);
gameGraph.addArc(hoop, clapp);
gameGraph.addArc(tunnels, clapp);
}
public AdjMatGraphPlus<Level> getGameGraph () {
return this.gameGraph;
}
public Level getRome () {
return this.rome;
}
public Level getTuscany () {
return this.tuscany;
}
public Level getVenice () {
return this.venice;
}
public Level getQuad () {
return this.quad;
}
public Level getTupelo () {
return this.tupelo;
}
public Level getHoop () {
return this.hoop;
}
public Level getTunnels () {
return this.tunnels;
}
public Level getClapp () {
return this.clapp;
}
}