Update 'enigma_types.h'

This commit is contained in:
NaiJi ✨ 2022-03-23 21:16:58 +00:00
parent 7f4aa0f9a9
commit 83ae194e72
1 changed files with 119 additions and 115 deletions

View File

@ -49,122 +49,126 @@ size_t key_shifts[WHEELS_AMOUNT] =
struct Mutation struct Mutation
{ {
size_t from = 0; int from;
size_t to = 0; int to;
}; };
const Mutation mutations[WHEELS_AMOUNT + 1][ALPHABET_SIZE] = const Mutation mutations1[ALPHABET_SIZE] =
{ {
{ {0, 15 },
{0, 15 }, {1, 4 },
{1, 4 }, {2, 25 },
{2, 25 }, {3, 20 },
{3, 20 }, {4, 14 },
{4, 14 }, {5, 7 },
{5, 7 }, {6, 23 },
{6, 23 }, {7, 18 },
{7, 18 }, {8, 2 },
{8, 2 }, {9, 21 },
{9, 21 }, {10, 5 },
{10, 5 }, {11, 12 },
{11, 12 }, {12, 19 },
{12, 19 }, {13, 1 },
{13, 1 }, {14, 6 },
{14, 6 }, {15, 11 },
{15, 11 }, {16, 17 },
{16, 17 }, {17, 8 },
{17, 8 }, {18, 13 },
{18, 13 }, {19, 16 },
{19, 16 }, {20, 9 },
{20, 9 }, {21, 22 },
{21, 22 }, {22, 0 },
{22, 0 }, {23, 24 },
{23, 24 }, {24, 3 },
{24, 3 }, {25, 10 }
{25, 10 } };
},
{ const Mutation mutations2[ALPHABET_SIZE] =
{0, 25 }, {
{1, 14 }, {0, 25 },
{2, 20 }, {1, 14 },
{3, 4 }, {2, 20 },
{4, 18 }, {3, 4 },
{5, 24 }, {4, 18 },
{6, 3 }, {5, 24 },
{7, 10 }, {6, 3 },
{8, 5 }, {7, 10 },
{9, 22 }, {8, 5 },
{10, 15 }, {9, 22 },
{11, 2 }, {10, 15 },
{12, 8 }, {11, 2 },
{13, 16 }, {12, 8 },
{14, 23 }, {13, 16 },
{15, 7 }, {14, 23 },
{16, 12 }, {15, 7 },
{17, 21 }, {16, 12 },
{18, 1 }, {17, 21 },
{19, 11 }, {18, 1 },
{20, 6 }, {19, 11 },
{21, 13 }, {20, 6 },
{22, 9 }, {21, 13 },
{23, 17 }, {22, 9 },
{24, 0 }, {23, 17 },
{25, 19 } {24, 0 },
}, {25, 19 }
{ };
{0, 4 },
{1, 7 }, const Mutation mutations3[ALPHABET_SIZE] =
{2, 17 }, {
{3, 21 }, {0, 4 },
{4, 23 }, {1, 7 },
{5, 6 }, {2, 17 },
{6, 0 }, {3, 21 },
{7, 14 }, {4, 23 },
{8, 1 }, {5, 6 },
{9, 16 }, {6, 0 },
{10, 20 }, {7, 14 },
{11, 18 }, {8, 1 },
{12, 8 }, {9, 16 },
{13, 12 }, {10, 20 },
{14, 25 }, {11, 18 },
{15, 5 }, {12, 8 },
{16, 11 }, {13, 12 },
{17, 24 }, {14, 25 },
{18, 13 }, {15, 5 },
{19, 22 }, {16, 11 },
{20, 10 }, {17, 24 },
{21, 19 }, {18, 13 },
{22, 15 }, {19, 22 },
{23, 3 }, {20, 10 },
{24, 9 }, {21, 19 },
{25, 2 } {22, 15 },
}, {23, 3 },
{ {24, 9 },
{0, 21}, {25, 2 }
{1, 10}, };
{2, 22},
{3, 17}, const Mutation mutations4[ALPHABET_SIZE] =
{4, 6}, {
{5, 8}, {0, 21},
{6, 4}, {1, 10},
{7, 19}, {2, 22},
{8, 5}, {3, 17},
{9, 25}, {4, 6},
{10, 1}, {5, 8},
{11, 20}, {6, 4},
{12, 18}, {7, 19},
{13, 15}, {8, 5},
{14, 16}, {9, 25},
{15, 13}, {10, 1},
{16, 14}, {11, 20},
{17, 3}, {12, 18},
{18, 12}, {13, 15},
{19, 7}, {14, 16},
{20, 11}, {15, 13},
{21, 0}, {16, 14},
{22, 2}, {17, 3},
{23, 24}, {18, 12},
{24, 23}, {19, 7},
{25, 9} {20, 11},
} {21, 0},
{22, 2},
{23, 24},
{24, 23},
{25, 9}
}; };