Skip to content

LocalGhostMedia/csdemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Campsot Demo

This demo digests the JSON supplied by Campspot to display to the user available camp sites.

Prerequisites

You should have Node.js installed on your computer. If you do not go install from here: Node.JS

Installing

First pull down the project and go to that folder with your CLI.

Install needed packages with

npm install

After that is finished, you can run the program with

npm start

Your default browser should open displaying localhost:3000 as Campspot Demo

Running the tests

Run tests with

npm test

If no tests are ran (due to no code changed since last commit), press 'a' to run all tests

Built With

Conclusion

The expected output of the sample file was:

   "Daniel Boone Bungalow"
   "Teddy Roosevelt Tent Site"
   "Bear Grylls Cozy Cave"
   "Wyatt Earp Corral"

This was calculated by 3 steps of logic.

  1. Go through all campsites and match them with their reservations
  2. Determine if the search reservation overlaps a. If the startGap/endGap is a designated gapSize b. If the startGap/endGap is negative and absolute value is not more than the duration of the search.
  3. Display campsites that have no overlap

Authors

  • Ty Smith - Initial work

About

CS Demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published