From d379433b1e83dc5094f0a85bb92fccd99ea742eb Mon Sep 17 00:00:00 2001 From: Aaron Altounian Date: Fri, 1 Feb 2019 02:21:47 -0600 Subject: [PATCH 1/6] built spaceTravelToMars, all tests pass --- 05week/spaceTravelToMars.js | 45 ++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/05week/spaceTravelToMars.js b/05week/spaceTravelToMars.js index ce258a382..475ba77c9 100644 --- a/05week/spaceTravelToMars.js +++ b/05week/spaceTravelToMars.js @@ -2,6 +2,7 @@ let assert = require('assert'); +// object to define which jobs can occupy which ships: let jobTypes = { pilot: 'MAV', mechanic: 'Repair Ship', @@ -9,7 +10,49 @@ let jobTypes = { programmer: 'Any Ship!' }; -// Your code here +// class to construct new crew members & define a function to enter ship: +class CrewMember { + constructor( name, job, specialSkill ) { + // make new property keys for the new crewmember and use the parameters passed in for the values + this.name = name, + this.job = job.toLowerCase(), + this.specialSkill = specialSkill + // create property key named ship and set it to null for now: + this.ship = null; + } + + // function to enter ship: + enterShip( ship ) { + // iterate through each property in jobTypes: + for( let key in jobTypes ) { + // if the current property key in jobTypes equals this crewmember's job, AND the value of the current property key equals the ship's type, push this crewmember onto the ship's crew array, and set this crewmember's ship to the ship that was passed into the function: + if( key == this.job && jobTypes[key] == ship.type ) { + ship.crew.push(this); + this.ship = ship; + } + } + } +} + +// class to construct new ships and define a function to run a mission: +class Ship { + constructor( name, type, ability ) { + // create property keys and use the passed in parameters to set values: + this.name = name, + this.type = type, + this.ability = ability, + // also create empty array called crew to push crewmembers onto using enterShip function: + this.crew = [] + } + + // create function to check if a ship has a crew & can therefore go on a mission: + missionStatement() { + // if this ship's crew length is not 1, no mission can occur: + if( this.crew.length !== 1 ) return "Can't perform a mission yet."; + // or else if the ship has a crewmember, return the mission ability: + else return this.ability; + } +} //tests if (typeof describe === 'function'){ From 363aedfa621aa791fde82d808b1fd2b393aa3268 Mon Sep 17 00:00:00 2001 From: Aaron Altounian Date: Fri, 1 Feb 2019 02:43:42 -0600 Subject: [PATCH 2/6] changed up enterShip(), now allows programmer to enter any ship, also displays error message if crewmember unable to enter chosen ship --- 05week/spaceTravelToMars.js | 40 ++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/05week/spaceTravelToMars.js b/05week/spaceTravelToMars.js index 475ba77c9..672c4e28a 100644 --- a/05week/spaceTravelToMars.js +++ b/05week/spaceTravelToMars.js @@ -1,6 +1,7 @@ 'use strict'; let assert = require('assert'); +let colors = require('colors'); // object to define which jobs can occupy which ships: let jobTypes = { @@ -23,14 +24,27 @@ class CrewMember { // function to enter ship: enterShip( ship ) { + let validEntry; // iterate through each property in jobTypes: - for( let key in jobTypes ) { - // if the current property key in jobTypes equals this crewmember's job, AND the value of the current property key equals the ship's type, push this crewmember onto the ship's crew array, and set this crewmember's ship to the ship that was passed into the function: - if( key == this.job && jobTypes[key] == ship.type ) { - ship.crew.push(this); - this.ship = ship; + if( this.job == 'programmer' ) { + validEntry = true; + } + else { + for( let key in jobTypes ) { + // if the current property key in jobTypes equals this crewmember's job, AND the value of the current property key equals the ship's type, push this crewmember onto the ship's crew array, and set this crewmember's ship to the ship that was passed into the function: + if( key == this.job && jobTypes[key] == ship.type ) { + validEntry = true; + break; + // ship.crew.push(this); + // this.ship = ship; + } } } + if( validEntry ) { + ship.crew.push(this); + this.ship = ship; + } + else console.log( colors.red( `${this.job.charAt(0).toUpperCase()}${this.job.slice(1)}s can't enter the ${ship.name}!` ) ); } } @@ -54,6 +68,22 @@ class Ship { } } +let crewMember1 = new CrewMember('Peter', 'pilot', 'surfing'); +let crewMember2 = new CrewMember('John', 'commander', 'crosswords'); +let crewMember3 = new CrewMember('Tanto', 'mechanic', 'smashing things'); +let crewMember4 = new CrewMember('Judith', 'programmer', 'restoring cars'); + +let mav = new Ship('Mars Ascent Vehicle', 'MAV', 'Ascend into low orbit'); +let hermes = new Ship('Helical Electromagnetic Rover Matriculating Exo Ship', 'Main Ship', 'Interplanetary Space Travel'); +let reparo = new Ship('Reparo', 'Repair Ship', 'Fixing Broken Shit...'); + +crewMember1.enterShip(mav); +crewMember1.enterShip(hermes); +crewMember2.enterShip(hermes); +crewMember3.enterShip(reparo); +crewMember4.enterShip(mav); +crewMember4.enterShip(hermes); + //tests if (typeof describe === 'function'){ describe('CrewMember', function(){ From 211ee395f1a457dd10481e8dc66725e18c34c287 Mon Sep 17 00:00:00 2001 From: Aaron Altounian Date: Fri, 1 Feb 2019 02:57:20 -0600 Subject: [PATCH 3/6] wrote some new tests --- 05week/spaceTravelToMars.js | 64 ++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 15 deletions(-) diff --git a/05week/spaceTravelToMars.js b/05week/spaceTravelToMars.js index 672c4e28a..4e1070d04 100644 --- a/05week/spaceTravelToMars.js +++ b/05week/spaceTravelToMars.js @@ -45,6 +45,7 @@ class CrewMember { this.ship = ship; } else console.log( colors.red( `${this.job.charAt(0).toUpperCase()}${this.job.slice(1)}s can't enter the ${ship.name}!` ) ); + return false; } } @@ -61,28 +62,30 @@ class Ship { // create function to check if a ship has a crew & can therefore go on a mission: missionStatement() { - // if this ship's crew length is not 1, no mission can occur: - if( this.crew.length !== 1 ) return "Can't perform a mission yet."; + // if this ship's crew length is empty, no mission can occur: + if( this.crew.length == 0 ) return "Can't perform a mission yet."; // or else if the ship has a crewmember, return the mission ability: else return this.ability; } } -let crewMember1 = new CrewMember('Peter', 'pilot', 'surfing'); -let crewMember2 = new CrewMember('John', 'commander', 'crosswords'); -let crewMember3 = new CrewMember('Tanto', 'mechanic', 'smashing things'); -let crewMember4 = new CrewMember('Judith', 'programmer', 'restoring cars'); +// some stuff i used to test/run the program, just keeping it here in case i need to use it again: -let mav = new Ship('Mars Ascent Vehicle', 'MAV', 'Ascend into low orbit'); -let hermes = new Ship('Helical Electromagnetic Rover Matriculating Exo Ship', 'Main Ship', 'Interplanetary Space Travel'); -let reparo = new Ship('Reparo', 'Repair Ship', 'Fixing Broken Shit...'); +// let crewMember1 = new CrewMember('Peter', 'pilot', 'surfing'); +// let crewMember2 = new CrewMember('John', 'commander', 'crosswords'); +// let crewMember3 = new CrewMember('Tanto', 'mechanic', 'smashing things'); +// let crewMember4 = new CrewMember('Judith', 'programmer', 'restoring cars'); -crewMember1.enterShip(mav); -crewMember1.enterShip(hermes); -crewMember2.enterShip(hermes); -crewMember3.enterShip(reparo); -crewMember4.enterShip(mav); -crewMember4.enterShip(hermes); +// let mav = new Ship('Mars Ascent Vehicle', 'MAV', 'Ascend into low orbit'); +// let hermes = new Ship('Helical Electromagnetic Rover Matriculating Exo Ship', 'Main Ship', 'Interplanetary Space Travel'); +// let reparo = new Ship('Reparo', 'Repair Ship', 'Fixing Broken Shit...'); + +// crewMember1.enterShip(mav); +// crewMember1.enterShip(hermes); +// crewMember2.enterShip(hermes); +// crewMember3.enterShip(reparo); +// crewMember4.enterShip(mav); +// crewMember4.enterShip(hermes); //tests if (typeof describe === 'function'){ @@ -103,6 +106,37 @@ if (typeof describe === 'function'){ assert.equal(mav.crew.length, 1); assert.equal(mav.crew[0], crewMember1); }); + + it('should not allow a crewmember into the wrong ship', function(){ + let crewMember1 = new CrewMember('Peter', 'pilot', 'surfing'); + let crewMember2 = new CrewMember('John', 'commander', 'crosswords'); + let crewMember3 = new CrewMember('Tanto', 'mechanic', 'smashing things'); + let mav = new Ship('Mars Ascent Vehicle', 'MAV', 'Ascend into low orbit'); + let hermes = new Ship('Helical Electromagnetic Rover Matriculating Exo Ship', 'Main Ship', 'Interplanetary Space Travel'); + let reparo = new Ship('Reparo', 'Repair Ship', 'Fixing Broken Shit...'); + assert.equal(crewMember1.enterShip(hermes), false); + assert.equal(crewMember2.enterShip(reparo), false); + assert.equal(crewMember3.enterShip(mav), false) + }); + + it('should allow programmer into any ship', function(){ + let crewMember1 = new CrewMember('Judith Resnik', 'programmer', 'engineering'); + let mav = new Ship('Mars Ascent Vehicle', 'MAV', 'Ascend into low orbit'); + let hermes = new Ship('Helical Electromagnetic Rover Matriculating Exo Ship', 'Main Ship', 'Interplanetary Space Travel'); + let reparo = new Ship('Reparo', 'Repair Ship', 'Fixing Broken Shit...'); + crewMember1.enterShip(mav); + assert.equal(crewMember1.ship, mav); + assert.equal(mav.crew.length, 1); + assert.equal(mav.crew[0], crewMember1); + crewMember1.enterShip(hermes); + assert.equal(crewMember1.ship, hermes); + assert.equal(hermes.crew.length, 1); + assert.equal(hermes.crew[0], crewMember1); + crewMember1.enterShip(reparo); + assert.equal(crewMember1.ship, reparo); + assert.equal(reparo.crew.length, 1); + assert.equal(reparo.crew[0], crewMember1); + }); }); describe('Ship', function(){ From b7bcd0345159fff6da671d2e28b475977f74296a Mon Sep 17 00:00:00 2001 From: Aaron Altounian Date: Fri, 1 Feb 2019 17:21:22 -0600 Subject: [PATCH 4/6] tried to add interactivity via cli. made a mess instead. still works as originally intended. --- 05week/spaceTravelToMars.js | 78 ++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 2 deletions(-) diff --git a/05week/spaceTravelToMars.js b/05week/spaceTravelToMars.js index 4e1070d04..8bc69cb14 100644 --- a/05week/spaceTravelToMars.js +++ b/05week/spaceTravelToMars.js @@ -2,6 +2,12 @@ let assert = require('assert'); let colors = require('colors'); +let readline = require('readline'); + +const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout +}); // object to define which jobs can occupy which ships: let jobTypes = { @@ -69,17 +75,85 @@ class Ship { } } -// some stuff i used to test/run the program, just keeping it here in case i need to use it again: +// was trying to make this into something you can interact with via cli, really just made a mess tho: // let crewMember1 = new CrewMember('Peter', 'pilot', 'surfing'); // let crewMember2 = new CrewMember('John', 'commander', 'crosswords'); // let crewMember3 = new CrewMember('Tanto', 'mechanic', 'smashing things'); // let crewMember4 = new CrewMember('Judith', 'programmer', 'restoring cars'); -// let mav = new Ship('Mars Ascent Vehicle', 'MAV', 'Ascend into low orbit'); +// let mav = new Ship('Mars Ascent Vehicle', 'MAV', 'Ascending into low orbit'); // let hermes = new Ship('Helical Electromagnetic Rover Matriculating Exo Ship', 'Main Ship', 'Interplanetary Space Travel'); // let reparo = new Ship('Reparo', 'Repair Ship', 'Fixing Broken Shit...'); +// let crew; +// let ship; + +// const determineCrew = function(number) { +// switch(number){ +// case '1': +// crew = crewMember1; +// break; +// case '2': +// crew = crewMember2; +// break; +// case '3': +// crew = crewMember3; +// break; +// case '4': +// crew = crewMember4; +// break; +// default: +// console.log('That is not a valid crew member.'); +// } +// } + +// const determineShip = function(ship) { +// ship = ship.toLowerCase().trim(); +// switch(ship) { +// case 'mav': +// ship = mav; +// break; +// case 'hermes': +// ship = hermes; +// break; +// case 'reparo': +// ship = reparo; +// break; +// default: +// console.log('That is not a valid ship.'); +// } +// } + +// const crewToShip = function(crew, ship) { +// if( !crew.enterShip(ship) ) { +// crew.enterShip(ship); +// ship.missionStatement(); +// crewToShip(crew, ship); +// } +// else { +// crew.enterShip(ship); +// console.log(`Mission confirmed! This ship is occupied by a ${crew.job} and is designed for ${ship.missionStatement()}!`) +// console.log(`Launching Mission...`); +// } +// } + +// const travelToMars = function() { +// rl.question(`Choose crew member 1, 2, 3, or 4! `, (number) => { +// determineCrew(number); +// console.log(`Crew member ${number}'s name is ${crew.name}, their job is ${crew.job} and their special skill is ${crew.specialSkill}.`) +// rl.question(`Put crew member into which ship? (mav, hermes, or reparo) `, (ship) => { +// determineShip(ship); +// // crewToShip(crew, ship); +// console.log(crew); +// console.log(ship); +// }) +// }) +// } +// travelToMars(); + +// some stuff i used for manual testing: + // crewMember1.enterShip(mav); // crewMember1.enterShip(hermes); // crewMember2.enterShip(hermes); From fca02ed2ae1a44cf331d8dd7aaf7ab18e8ea4d84 Mon Sep 17 00:00:00 2001 From: Aaron Altounian Date: Sun, 3 Feb 2019 17:18:07 -0600 Subject: [PATCH 5/6] trying to get this working as something you can interact with via the cli --- 05week/spaceTravelToMars.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/05week/spaceTravelToMars.js b/05week/spaceTravelToMars.js index 8bc69cb14..f27727287 100644 --- a/05week/spaceTravelToMars.js +++ b/05week/spaceTravelToMars.js @@ -87,7 +87,6 @@ class Ship { // let reparo = new Ship('Reparo', 'Repair Ship', 'Fixing Broken Shit...'); // let crew; -// let ship; // const determineCrew = function(number) { // switch(number){ @@ -127,12 +126,12 @@ class Ship { // const crewToShip = function(crew, ship) { // if( !crew.enterShip(ship) ) { -// crew.enterShip(ship); +// crew.prototype.enterShip(ship); // ship.missionStatement(); // crewToShip(crew, ship); // } // else { -// crew.enterShip(ship); +// crew.prototype.enterShip(ship); // console.log(`Mission confirmed! This ship is occupied by a ${crew.job} and is designed for ${ship.missionStatement()}!`) // console.log(`Launching Mission...`); // } @@ -144,9 +143,9 @@ class Ship { // console.log(`Crew member ${number}'s name is ${crew.name}, their job is ${crew.job} and their special skill is ${crew.specialSkill}.`) // rl.question(`Put crew member into which ship? (mav, hermes, or reparo) `, (ship) => { // determineShip(ship); -// // crewToShip(crew, ship); -// console.log(crew); -// console.log(ship); +// crewToShip(crew, ship); +// // console.log(crew); +// // console.log(ship); // }) // }) // } From aa045f16904b63d84a995d582fd0c6895d7fef4f Mon Sep 17 00:00:00 2001 From: Aaron Altounian Date: Tue, 5 Feb 2019 22:14:11 -0600 Subject: [PATCH 6/6] redid using functions and prototypes instead of class. removed the readline BS i was trying to do. added some comments --- 05week/spaceTravelToMars.js | 221 +++++++++++++++--------------------- 1 file changed, 92 insertions(+), 129 deletions(-) diff --git a/05week/spaceTravelToMars.js b/05week/spaceTravelToMars.js index f27727287..144f779e2 100644 --- a/05week/spaceTravelToMars.js +++ b/05week/spaceTravelToMars.js @@ -2,12 +2,6 @@ let assert = require('assert'); let colors = require('colors'); -let readline = require('readline'); - -const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout -}); // object to define which jobs can occupy which ships: let jobTypes = { @@ -17,148 +11,117 @@ let jobTypes = { programmer: 'Any Ship!' }; -// class to construct new crew members & define a function to enter ship: -class CrewMember { - constructor( name, job, specialSkill ) { - // make new property keys for the new crewmember and use the parameters passed in for the values - this.name = name, - this.job = job.toLowerCase(), - this.specialSkill = specialSkill - // create property key named ship and set it to null for now: - this.ship = null; - } +// approach using function and prototype: +let CrewMember = function( name, job, specialSkill ) { + this.name = name; + this.job = job.toLowerCase(); + this.specialSkill = specialSkill; +} - // function to enter ship: - enterShip( ship ) { - let validEntry; +CrewMember.prototype.enterShip = function( ship ) { + // need to determine if the crewmember can enter the selected ship: + let canEnterShip = false; + // if the crewmember's job is 'programmer', they can enter any ship: + if( this.job == 'programmer' ) { + canEnterShip = true; + } + // or else figure out if the crewmember can enter the ship based on their job (defined in the jobTypes array): + else { // iterate through each property in jobTypes: - if( this.job == 'programmer' ) { - validEntry = true; - } - else { - for( let key in jobTypes ) { - // if the current property key in jobTypes equals this crewmember's job, AND the value of the current property key equals the ship's type, push this crewmember onto the ship's crew array, and set this crewmember's ship to the ship that was passed into the function: - if( key == this.job && jobTypes[key] == ship.type ) { - validEntry = true; - break; - // ship.crew.push(this); - // this.ship = ship; - } + for( let key in jobTypes ) { + // if the current property key in jobTypes equals this crewmember's job, AND the value of the current property key equals the ship's type,set canEnterShip to true and break out of the loop: + if( key == this.job && jobTypes[key] == ship.type ) { + canEnterShip = true; + break; } } - if( validEntry ) { - ship.crew.push(this); - this.ship = ship; - } - else console.log( colors.red( `${this.job.charAt(0).toUpperCase()}${this.job.slice(1)}s can't enter the ${ship.name}!` ) ); + } + // if crew member can enter ship, push this crewmember onto the ship's crew array, and set this crewmember's ship to the entered ship: + if( canEnterShip ) { + ship.crew.push(this); + this.ship = ship; + } + // or else display error message: + else { + console.log( colors.red( `${this.job.charAt(0).toUpperCase()}${this.job.slice(1)}s can't enter the ${ship.name}!` ) ); + // necessary for the tests to pass: return false; } } -// class to construct new ships and define a function to run a mission: -class Ship { - constructor( name, type, ability ) { - // create property keys and use the passed in parameters to set values: - this.name = name, - this.type = type, - this.ability = ability, - // also create empty array called crew to push crewmembers onto using enterShip function: - this.crew = [] - } +let Ship = function( name, type, ability ) { + this.name = name; + this.type = type; + this.ability = ability; + this.crew = []; +} - // create function to check if a ship has a crew & can therefore go on a mission: - missionStatement() { - // if this ship's crew length is empty, no mission can occur: - if( this.crew.length == 0 ) return "Can't perform a mission yet."; - // or else if the ship has a crewmember, return the mission ability: - else return this.ability; - } +Ship.prototype.missionStatement = function() { + // if this ship's crew length is empty, no mission can occur: + if( this.crew.length == 0 ) return "Can't perform a mission yet."; + // or else if the ship has a crewmember, return the mission ability: + else return this.ability; } -// was trying to make this into something you can interact with via cli, really just made a mess tho: - -// let crewMember1 = new CrewMember('Peter', 'pilot', 'surfing'); -// let crewMember2 = new CrewMember('John', 'commander', 'crosswords'); -// let crewMember3 = new CrewMember('Tanto', 'mechanic', 'smashing things'); -// let crewMember4 = new CrewMember('Judith', 'programmer', 'restoring cars'); - -// let mav = new Ship('Mars Ascent Vehicle', 'MAV', 'Ascending into low orbit'); -// let hermes = new Ship('Helical Electromagnetic Rover Matriculating Exo Ship', 'Main Ship', 'Interplanetary Space Travel'); -// let reparo = new Ship('Reparo', 'Repair Ship', 'Fixing Broken Shit...'); - -// let crew; - -// const determineCrew = function(number) { -// switch(number){ -// case '1': -// crew = crewMember1; -// break; -// case '2': -// crew = crewMember2; -// break; -// case '3': -// crew = crewMember3; -// break; -// case '4': -// crew = crewMember4; -// break; -// default: -// console.log('That is not a valid crew member.'); +// approach using classes and constructors: + +// class to construct new crew members & define a function to enter ship: +// class CrewMember { +// constructor( name, job, specialSkill ) { +// // make new property keys for the new crewmember and use the parameters passed in for the values +// this.name = name, +// this.job = job.toLowerCase(), +// this.specialSkill = specialSkill +// // create property key named ship and set it to null for now: +// this.ship = null; // } -// } -// const determineShip = function(ship) { -// ship = ship.toLowerCase().trim(); -// switch(ship) { -// case 'mav': -// ship = mav; -// break; -// case 'hermes': -// ship = hermes; -// break; -// case 'reparo': -// ship = reparo; -// break; -// default: -// console.log('That is not a valid ship.'); +// // function to enter ship: +// enterShip( ship ) { +// let validEntry; +// // iterate through each property in jobTypes: +// if( this.job == 'programmer' ) { +// validEntry = true; +// } +// else { +// for( let key in jobTypes ) { +// // if the current property key in jobTypes equals this crewmember's job, AND the value of the current property key equals the ship's type, push this crewmember onto the ship's crew array, and set this crewmember's ship to the ship that was passed into the function: +// if( key == this.job && jobTypes[key] == ship.type ) { +// validEntry = true; +// break; +// // ship.crew.push(this); +// // this.ship = ship; +// } +// } +// } +// if( validEntry ) { +// ship.crew.push(this); +// this.ship = ship; +// } +// else console.log( colors.red( `${this.job.charAt(0).toUpperCase()}${this.job.slice(1)}s can't enter the ${ship.name}!` ) ); +// return false; // } // } -// const crewToShip = function(crew, ship) { -// if( !crew.enterShip(ship) ) { -// crew.prototype.enterShip(ship); -// ship.missionStatement(); -// crewToShip(crew, ship); -// } -// else { -// crew.prototype.enterShip(ship); -// console.log(`Mission confirmed! This ship is occupied by a ${crew.job} and is designed for ${ship.missionStatement()}!`) -// console.log(`Launching Mission...`); +// class to construct new ships and define a function to run a mission: +// class Ship { +// constructor( name, type, ability ) { +// // create property keys and use the passed in parameters to set values: +// this.name = name, +// this.type = type, +// this.ability = ability, +// // also create empty array called crew to push crewmembers onto using enterShip function: +// this.crew = [] // } -// } -// const travelToMars = function() { -// rl.question(`Choose crew member 1, 2, 3, or 4! `, (number) => { -// determineCrew(number); -// console.log(`Crew member ${number}'s name is ${crew.name}, their job is ${crew.job} and their special skill is ${crew.specialSkill}.`) -// rl.question(`Put crew member into which ship? (mav, hermes, or reparo) `, (ship) => { -// determineShip(ship); -// crewToShip(crew, ship); -// // console.log(crew); -// // console.log(ship); -// }) -// }) +// // create function to check if a ship has a crew & can therefore go on a mission: +// missionStatement() { +// // if this ship's crew length is empty, no mission can occur: +// if( this.crew.length == 0 ) return "Can't perform a mission yet."; +// // or else if the ship has a crewmember, return the mission ability: +// else return this.ability; +// } // } -// travelToMars(); - -// some stuff i used for manual testing: - -// crewMember1.enterShip(mav); -// crewMember1.enterShip(hermes); -// crewMember2.enterShip(hermes); -// crewMember3.enterShip(reparo); -// crewMember4.enterShip(mav); -// crewMember4.enterShip(hermes); //tests if (typeof describe === 'function'){