Giter Site home page Giter Site logo

comprosoftceo / mothersday2020 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 20 KB

Cracking the Secret Codes

C++ 94.98% C 1.42% Makefile 3.60%
secret-code encoding puzzle puzzle-game algorithm-challenges encoding-algorithms cipher ciphers cipher-algorithms cipher-algorithm

mothersday2020's Introduction

Mother's Day 2020 Card

Cracking the Secret Codes


About

Every year, I like to program cards for my family for special events, including:

  • Birthdays
  • Father's Day
  • Mother's Day
  • etc.

I don't normally post the cards I program, but I was really proud of Mom's code breaking challenge this year, so I wanted to go ahead and post the source code. I hope that you can also enjoy playing it! I've removed any personal family references from the code.


Compiling the Code

To compile the code, you need to have the GNU Readline Library installed on your system.

Ubuntu:

sudo apt install libreadline-dev

Fedora:

sudo yum install readline-devel

Windows:

There is also a Windows version, but it is a bit trickier to install and configure the shared library and header files.


You will also need a C++11 compiler and GNU Make. To compile the code, simply run:

make

To rebuild the code, type:

make clean
make

This will produce MothersDay2020.out for the executable.


Running the Code

./MothersDay2020.out <WordsFile>

The game requires a text file of English words to use with the code algorithms. The program loads all words that are at least 10 letters long and only contain lowercase letters (so no capital letters, dashes, commas, apostrophies, etc.). The text file I used is words.txt from the GitHub repository english-words. However, you can use other dictionaries as well.


Game Commands

All Commands:

  • help = Help screen
  • word = Reshow the scrambled word
  • hint = Ask a hint for the problem
  • new = Pick a new word and reset the problem
  • quit = Exit the program
  • <solution> = Solve the problem

Undocumented Commands:

  • cheat = Used for debugging to show the solution

All Level Solutions

Level 1 First letter and last letter swapped
Level 2 Word Reversed
Level 3 Shifted right 1 letter
Level 4 Every letter becomes next letter (a->b, b->c, etc.)
Level 5 Shifted left 1 letter and reversed
Level 6 Vowels converted to symbols
Level 7 First half and second half swapped
Level 8 Interweaved letters, indicated by capital letters
Level 9 Every letter increased by a random amount (a->a+n)
Level 10 Random letter subsitution

Code Linters

The source code uses ClangFormat and Clang-Tidy to format the code and maintain a consistant style. You can either run these programs manually or install a plugin into your favorite code editor.

mothersday2020's People

Contributors

comprosoftceo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.