-
Notifications
You must be signed in to change notification settings - Fork 3
/
14f7ca5f6ff1a5afb9032aa5e533ad95.html
53 lines (44 loc) · 2.86 KB
/
14f7ca5f6ff1a5afb9032aa5e533ad95.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Eden Development Colossus Challenge - Question 1</title>
<LINK rel="stylesheet" href="../asset/css/site.css" type="text/css">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-431118-12']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="bodyContent">
<h1>YOUR FIRST CHALLENGE</h1>
<p>Our crack team of undercover operatives, the Special Secret People of Awesomeness (SSPA), have intercepted plans for an enemy message encoding machine known as the MARK I. The early prototype has been trial tested on the Western front to call in artillery strikes with great success, leading to many causalities on our side. Your mission is to create a computerized version of the MARK I.</p>
<p>The plans captured show the MARK I as being a very simple device. The operator sets an encoder wheel to a value between 0 and 9 as pre-determined by standard operating protocols. They then type on a keyboard and the resulting encoded character is sent to the field, which is then decoded and the commands are carried out.</p>
<p>The keyboard has the following set of characters (assuming a zero-based index), which are used for both the input and output messages.</p>
<pre>
<code>
[
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
".", ",", "?", "!", "'", "\"", " "
]
</code>
</pre>
<p>The MARK I functions by shifting the input character by the number shown on the wheel. Therefore, with a wheel setting of 5, an input character of 'a' will result in an encoded character of 'f', 'c' becomes 'h', and so forth. If the new index falls off the end of the set of characters, then it simply loops back to the beginning (and vice versa).</p>
<p>You will need to encode the words 'Strong NE Winds!' using your virtual MARK I device set at wheel position 6 and send it back to via JSON to allow you to move on to the next question.</p>
<div class="footer">
<p>Copyright © 2010 Eden Development (UK) Ltd. This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
</div>
</div>
</body>
</html>