{"id":18637604,"url":"https://github.com/justin-marian/magic-temple","last_synced_at":"2025-06-29T17:07:49.580Z","repository":{"id":225463153,"uuid":"766046303","full_name":"justin-marian/magic-temple","owner":"justin-marian","description":"Simple program that solves string problems: large number additions, cipher encodings and \"2-grams\"\".","archived":false,"fork":false,"pushed_at":"2024-03-03T13:21:27.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T09:12:27.503Z","etag":null,"topics":["c","caesar-cipher","encryption","parser","string-manipulation","vigenere-cipher"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justin-marian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-02T07:25:43.000Z","updated_at":"2024-03-11T00:11:00.000Z","dependencies_parsed_at":"2024-11-07T05:37:29.747Z","dependency_job_id":"5521ebcb-2f93-458d-8937-7bbc642caf64","html_url":"https://github.com/justin-marian/magic-temple","commit_stats":null,"previous_names":["justin-marian/magic-temple"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fmagic-temple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fmagic-temple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fmagic-temple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fmagic-temple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justin-marian","download_url":"https://codeload.github.com/justin-marian/magic-temple/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239433910,"owners_count":19637806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","caesar-cipher","encryption","parser","string-manipulation","vigenere-cipher"],"created_at":"2024-11-07T05:37:00.799Z","updated_at":"2025-02-18T08:19:36.410Z","avatar_url":"https://github.com/justin-marian.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Magic Temple\n\n## Overview\n\nThe `Magic Temple` project consists of a series of string problems based on:\n\n- **navigating** a character through a mystical temple\n- **encrypting** cryptographic operations\n- **predicting** word sequences.\n\n### Magical Words\n\nNavigating through a temple represented as a matrix, with a magic code dictating the path. The code consists of magical words of three types, each indicating a direction to move in the matrix:\n\n- `'a'`: Words starting with `'a'`, indicating a single step based on the **largest digit**.\n- `'b'`: Words starting with `'b'`, with movement based on properties of **palindromes and prime numbers**.\n- `'c'`: Words starting with `'c'`, where the movement is determined by the **sum of certain digits** and **its remainder when divided by 4**.\n\n### Strange Voice\n\nUpon exiting the maze, you encounter encrypted messages from a strange voice. This problem involves deciphering these messages using **Caesar and Vigenère** ciphers and performing **addition on large numbers**.\n\n- `Caesar`**:** shifts each letter and digit in the plaintext by a fixed number determined by a key, wrapping around the alphabet and number set.\n- `Vigenère`**:** applies a series of Caesar shifts varying per letter, based on the corresponding letter's position in the keyword.\n- `Addition`**:** sums two large numbers represented as strings, digit by digit, from right to left, accounting for any carry-over.\n\n### Help Prediction\n\nThe final task is to complete an algorithm that predicts the next words in a sentence based on the **[frequency of 2-grams](https://web.archive.org/web/20220127122755/https://en.wikipedia.org/wiki/N-gram)** in a given text. For the word prediction algorithm, you'll be enhancing a text analysis tool that computes the frequency of `2-grams—pairs of consecutive words`, assists in predicting word sequences.\n\nThis task involves reading and processing text to identify these word pairs, calculating how often each pair occurs, and using that information to predict what might come next in a sentence. This feature is case-sensitive and disregards punctuation, focusing solely on the words as they appear in the text.\n\n## Build the Project\n\n1. Navigate to the `build` directory.\n2. Run the `make` command to build the executable.\n\nThe `Makefile` provided will compile the source files and link them with the necessary libraries.\n\n```bash\n    cd ./build\n    make\n```\n\n## Run the Project\n\nAfter building the project, you can run the program with the shell script `temple_run.sh` to execute the program. This script sets up the necessary environment and arguments for the program to run the test suite.\n\n```bash\n    ./temple_run.sh\n    ..........................MAGIC WORDS..............................\n    Test 0.......................................................passed\n    Test 1.......................................................passed\n    Test 2.......................................................passed\n    Test 3.......................................................passed\n    Test 4.......................................................passed\n    \n    ............................MAGIC CIPHER...........................\n    ...............................CAESAR..............................\n    Test 0.......................................................passed\n    Test 1.......................................................passed\n    Test 2.......................................................passed\n    Test 3.......................................................passed\n    Test 4.......................................................passed\n    ..............................VIGENERE.............................\n    Test 0.......................................................passed\n    Test 1.......................................................passed\n    Test 2.......................................................passed\n    Test 3.......................................................passed\n    Test 4.......................................................passed\n    ..............................ADDITION.............................\n    Test 0.......................................................passed\n    Test 1.......................................................passed\n    Test 2.......................................................passed\n    Test 3.......................................................passed\n    Test 4.......................................................passed\n\n    .............................TWO GRAMS.............................\n    Test 0.......................................................passed\n    Test 1.......................................................passed\n    Test 2.......................................................passed\n    Test 3.......................................................passed\n    Test 4.......................................................passed\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin-marian%2Fmagic-temple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustin-marian%2Fmagic-temple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin-marian%2Fmagic-temple/lists"}