Skip to content

melissametz/Decoder-Ring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This site was built using GitHub Pages.

Instructions

You're planning a surprise birthday party for a friend who loves escape rooms and puzzles. What better way to practice your new coding skills than to build an application

that will help you encode and decode all kinds of fun messages?

For at least part of this project, try following a TDD process. Once you get the hang of it, you'll find that writing tests can be a great way to focus your workflow.

Learning Objectives

This project is designed to test your ability to build complex algorithms. It will also test your ability to write unit tests with Mocha and Chai to test your algorithms. You will not need to make any edits to HTML or CSS for this project. Before taking on this project, you should be comfortable with the learning objectives listed below:

  • Writing a series of unit tests using Mocha and Chai

  • Using different expect() methods to test your code

Project Steps to Complete

To complete this project, you must do the following:

  • Write code that passes all the tests in this lesson.

  • Write code that passes all of the requirements outlined below, and submit your GitHub repo link in the next lesson.

Requirements to Pass

For your project to pass, all of the following statements must be true. These criteria are reflected in the rubric in the following lesson.

For the Caesar shift (example: caesar("Zebra Magazine", 3) => "cheud pdjdclqh"), the tests that you write should test that the following is true:

  • It returns false if the shift value is equal to 0, less than -25, greater than 25, or not present.

  • It ignores capital letters. (For example, the results of A Message and a message should be the same.)

  • When encoding, it handles shifts that go past the end of the alphabet. (For example, shifting z to the right by 3 should cause the z to wrap around to the front of the alphabet, so that z becomes c.)

  • It maintains spaces and other nonalphabetic symbols in the message, before and after encoding or decoding.

For the Polybius square (example: polybius("message") => "23513434112251"), the tests that you write should test that the following is true:

  • When encoding, it translates the letters i and j to 42.

  • When decoding, it translates 42 to (i/j).

  • It ignores capital letters. (For example, the results of A Message and a message should be the same.)

  • It maintains spaces in the message, before and after encoding or decoding.

For the substitution cipher (example: substitution("message", "plmoknijbuhvygctfxrdzeswaq") => "ykrrpik"), the tests that you write should test that the following is true:

  • It returns false if the given alphabet isn't exactly 26 characters long.

  • It correctly translates the given phrase, based on the alphabet given to the function.

  • It returns false if there are any duplicate characters in the given alphabet.

  • It maintains spaces in the message, before and after encoding or decoding.

  • It ignores capital letters. (For example, the results of A Message and a message should be the same.)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published