Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,34 @@ const jobTypes = {
};

// Your code will go here
class CrewMember {
constructor(name, job, specialSkill, ship){
this.name = name
this.job = job
this.specialSkill = specialSkill
this.ship = ship;
}
enterShip(shipName){
this.ship = shipName
shipName.crew.push(this)
}
}

class Ship{
constructor(name, type, ability, crew){
this.name = name
this.type = type
this.ability = ability
this.crew = [];
}
missionStatement() {
if (this.crew.length >= 1) {
return this.ability
} else {
return "Can't perform a mission yet."
}
}
}



Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"eslint": "^3.19.0",
"functional-javascript-workshop": "^1.0.6",
"htmllint-cli": "github:kevincolten/htmllint-cli",
"http-server": "^0.11.1",
"http-server": "^0.12.3",
"javascripting": "^2.6.1",
"jsdom": "^11.6.2",
"mocha": "^5.0.0",
Expand Down