From afd8f511390ceb43cfbb371b96e692922afa9be8 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 11 Oct 2015 16:58:21 +0100 Subject: [PATCH] Initialise files --- Makefile | 18 ++++++++++++++++++ docs/Dev Notes.txt | 41 +++++++++++++++++++++++++++++++++++++++++ src/main.cpp | 8 ++++++++ 3 files changed, 67 insertions(+) create mode 100644 Makefile create mode 100644 docs/Dev Notes.txt create mode 100644 src/main.cpp diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bca675b --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +LIBS = src/libs/* +BUILD_ARGS = -Wall -Werror -Ilibs/ + + +build: libraries + g++ src/main.cpp -Ldist/* -Ilibs/ -o enigma + +libraries: + mkdir dist/ + for dir in $(LIBS); do \ + cd $$dir; \ + g++ -c *.c -I../;\ + mv *.o ../../dist; \ + cd -; + done + +clean: + rm -rf dist/ diff --git a/docs/Dev Notes.txt b/docs/Dev Notes.txt new file mode 100644 index 0000000..5490ca8 --- /dev/null +++ b/docs/Dev Notes.txt @@ -0,0 +1,41 @@ +Working: +multiple rotor wheels (5, choose 3) (8 for naval) +different wireing in each wheel +plug board link 2 letters (2 way link). 10 links, 20 letters used up +Fixed, non rotating wheel for relaying back through rotors +Letters could not be mapped to themselves! (Biggest flaw!) + + +Options: +Random generated rotors (use random seed) +rotors from given seed +rotors from actual setup (if available) + +plug board from random seed or given seed +option to skip plug board + +relay from random seed or given seed, or actual setup + +option to output text character by character (no enter required!) +option to convert string (output letter individually) +option to read / write string to file. +option to read all setup from file. + + + + +Process: +Keyboard : Plug Board : Rotor 1 : Rotor 2 : Rotor 3 : Relay : Rotor 3 : Rotor 2 : Rotor 1 : Plug Board : Key lights + + +Code Steps: +Calculate rotor codes (store to dictionary) (create all 5) +select 3 random rotors +generate plug board values (store to dictionary) + +Get input char +pass through plug board +rotor 1 2 3 +pass through relay +rotor 3 2 1 +pass through plug board \ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..631552f --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,8 @@ +#include "iostream"; + +using namespace std; + +int main() { + cout << 'Hello World'; + return 0; +} \ No newline at end of file