Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #116

Open
wants to merge 71 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
9651b64
Create dragon features
kaylahrose Jun 28, 2023
a579831
Fix typos
kaylahrose Jun 28, 2023
c4b1230
Fix typos and create greet rider function
kaylahrose Jun 28, 2023
7f422c2
Create eat function
kaylahrose Jun 28, 2023
7db1717
Complete dragon
kaylahrose Jun 28, 2023
80014d1
Create Hobbit
kaylahrose Jun 29, 2023
9b4b3d3
Age hobbit
kaylahrose Jun 30, 2023
55db33c
Create hobbit meet people functionality
kaylahrose Jun 30, 2023
734013d
Meet multiple people
kaylahrose Jun 30, 2023
e289b86
Meet multiple people
kaylahrose Jun 30, 2023
42a05b5
Find friends
kaylahrose Jun 30, 2023
d3c40e4
Create Vampire
kaylahrose Jun 30, 2023
0fbf350
Add pets
kaylahrose Jun 30, 2023
0c729f2
Create thirsty
kaylahrose Jun 30, 2023
6528028
Create shout
kaylahrose Jun 30, 2023
6d4c09a
Create ounces drank
kaylahrose Jun 30, 2023
073abb2
Create drink function
kaylahrose Jun 30, 2023
996c588
Update thirst
kaylahrose Jun 30, 2023
ba2fb6b
Limit drinking
kaylahrose Jun 30, 2023
15116f9
Refuse victim
kaylahrose Jun 30, 2023
b94fe22
Inquires place
kaylahrose Jun 30, 2023
f0ba527
Declines unvisited place
kaylahrose Jun 30, 2023
c9f2c11
Find bat lovers
kaylahrose Jun 30, 2023
b016ea6
Find fire breathers
kaylahrose Jun 30, 2023
17dd114
Update README.md
kaylahrose Jun 30, 2023
10efa07
Merge branch 'main' into mythical_creatures
kaylahrose Jun 30, 2023
0c26ff3
Merge pull request #1 from kaylahrose/mythical_creatures
kaylahrose Jun 30, 2023
5e8fe40
Create airports
kaylahrose Jun 30, 2023
0a323de
Refactors
kaylahrose Jun 30, 2023
a01bd9b
Land planes
kaylahrose Jun 30, 2023
87156fc
Work on available gates message
kaylahrose Jul 6, 2023
c44adb9
Create overflow message
kaylahrose Jul 10, 2023
705d0a0
Check airline locations
kaylahrose Jul 10, 2023
2f6d31a
Reformat
kaylahrose Jul 10, 2023
a3e4e3d
Merge pull request #2 from kaylahrose/airport
kaylahrose Jul 10, 2023
d80b455
Update README.md
kaylahrose Jul 10, 2023
8d32f01
Create songs
kaylahrose Jul 10, 2023
e39a531
Create has been played status
kaylahrose Jul 10, 2023
24faeae
Create default favorite status
kaylahrose Jul 10, 2023
bf03c49
Plays song
kaylahrose Jul 10, 2023
0a8fa8f
Make playlists
kaylahrose Jul 10, 2023
b450ccd
Play playlists
kaylahrose Jul 10, 2023
2a95edb
Add song to playlist
kaylahrose Jul 10, 2023
f94d678
Play favorites
kaylahrose Jul 10, 2023
38f1a1e
Merge pull request #3 from kaylahrose/dj
kaylahrose Jul 10, 2023
014c366
Update RED
kaylahrose Jul 10, 2023
afb1f01
Create favorite food
kaylahrose Jul 10, 2023
f48c62a
Create ingredients
kaylahrose Jul 10, 2023
f84e2ec
Add spicy status
kaylahrose Jul 10, 2023
9fde00a
Comment on spiciness
kaylahrose Jul 10, 2023
aa10c92
Create default order count
kaylahrose Jul 10, 2023
0b38a71
Order dish
kaylahrose Jul 10, 2023
93ee7d8
Create shopping list
kaylahrose Jul 10, 2023
2550948
Update readme
kaylahrose Jul 10, 2023
9ba9f7c
Merge pull request #4 from kaylahrose/favorite-foods
kaylahrose Jul 10, 2023
33f350c
Create player
kaylahrose Jul 10, 2023
4184b76
Create moveset
kaylahrose Jul 10, 2023
efc3cb2
Create level
kaylahrose Jul 10, 2023
52ec3e9
Add players to level
kaylahrose Jul 10, 2023
e7fe042
Add coins and lives to level
kaylahrose Jul 10, 2023
fef9f28
Find coins
kaylahrose Jul 10, 2023
b9aa7a0
Add life after coins collected
kaylahrose Jul 10, 2023
dadcc52
Defeat player
kaylahrose Jul 10, 2023
9285679
Print game over message
kaylahrose Jul 10, 2023
346771f
Merge pull request #5 from kaylahrose/video-games
kaylahrose Jul 10, 2023
3ba7026
Update README
kaylahrose Jul 10, 2023
51a59e9
Create birthday
kaylahrose Jul 10, 2023
9caacb4
Celebrate birthdays
kaylahrose Jul 10, 2023
f0ac569
Count birthdays
kaylahrose Jul 10, 2023
3cbf485
Update readme
kaylahrose Jul 10, 2023
c9d973d
Merge pull request #6 from kaylahrose/birthdays
kaylahrose Jul 10, 2023
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
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ You should see something like:
- should be able to have a different name
- should have a rider
- should be able to have a different rider
- should have a temperment
- should be able to have different temperments
- should have a temperament
- should be able to have different temperaments
- should greet their rider
- should start off having eaten 0 times
- should start off being hungry
- should be full after eating 3 times
- should be a fireBreather if aggressive in temperment
- should be a fireBreather if aggressive in temperament

0 passing (6ms)
11 pending
Expand All @@ -42,12 +42,12 @@ We find that when students complete the same test suite over and over, memorizat
Completing all of these test suites is not necessary, but you should be working on this repo regularly. We see that students are the most successful when they establish a routine for working through these test suites. For example, you might work on them for 45 minutes every morning before class. Find a routine that works best for you and plan ahead so you remain on track to complete the majority of the tests.

### Test Suites
- [ ] 🧚 ‍[Mythical Creatures](./mythical-creatures)
- [ ] ✈️ [Airport](./airport)
- [ ] 🎧 [DJ](./dj)
- [ ] 🍔 [Favorite Foods](./favorite-foods)
- [ ] 🎮 [Video Games](./video-games/)
- [ ] 🎂 [Birthdays](./birthdays)
- [x] 🧚 ‍[Mythical Creatures](./mythical-creatures)
- [x] ✈️ [Airport](./airport)
- [x] 🎧 [DJ](./dj)
- [x] 🍔 [Favorite Foods](./favorite-foods)
- [x] 🎮 [Video Games](./video-games/)
- [x] 🎂 [Birthdays](./birthdays)
- [ ] 🗓 [Calendar](./calendar/)
- [ ] 💵 [Vending Machine](./dollar-store-vending-machine/)
- [ ] 🛗 [Elevator](./elevator/)
Expand Down
11 changes: 6 additions & 5 deletions airport/airport-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ var assert = require('chai').assert;
var { createAirport, welcomeGuests, landPlanes, checkAirlineLocations } = require('./airport');

describe('Airport', function() {
it.skip('should create an airport', function() {
it('should create an airport', function() {
var airport = createAirport('Denver International Airport', ['United', 'Southwest', 'Delta'], 144);

assert.equal(airport.name, 'Denver International Airport');
assert.equal(airport.availableGates, 144);
assert.equal(airport.airlines[0], 'United');
});

it.skip('should welcome people to the airport', function() {
it('should welcome people to the airport', function() {
var denverAirport = createAirport('Denver International Airport', ['United', 'Southwest', 'Delta'], 144);
var sanDiegoAirport = createAirport('San Diego International Airport', ['Frontier', 'American'], 48);

Expand All @@ -22,7 +22,7 @@ describe('Airport', function() {
assert.equal(sanDiegoWelcome, 'Welcome to San Diego International Airport!');
});

it.skip('should keep track of open gates', function() {
it('should keep track of open gates', function() {
var bakersfieldAirport = createAirport('Meadows Field Airport', ['United', 'American'], 12);
var sanDiegoAirport = createAirport('San Diego International Airport', ['Frontier', 'American'], 48);

Expand All @@ -33,12 +33,13 @@ describe('Airport', function() {
assert.equal(sanDiegoGates.availableGates, 46);
});

it.skip('should not be able to occupy more gates than available', function() {
it('should not be able to occupy more gates than available', function() {
var columbusAiport = createAirport('John Glenn Airport', ['Southwest', 'Frontier'], 24);

var updatedAirportGates = landPlanes(columbusAiport, 22);

assert.equal(updatedAirportGates.availableGates, 2);
console.log(updatedAirportGates.message);
assert.equal(updatedAirportGates.message, 'Success! Current availability is 2.')

var updatedAirportGates2 = landPlanes(updatedAirportGates, 3);
Expand All @@ -47,7 +48,7 @@ describe('Airport', function() {
assert.equal(updatedAirportGates2.message, 'Oh no! Not enough gates available. Current overflow is 1.')
});

it.skip('should be able to tell you where an airline flies to', function() {
it('should be able to tell you where an airline flies to', function() {
var columbusAiport = createAirport('John Glenn Airport', ['Southwest', 'Frontier'], 24);
var bakersfieldAirport = createAirport('Meadows Field Airport', ['United', 'American'], 12);
var sanDiegoAirport = createAirport('San Diego International Airport', ['Frontier', 'American'], 48);
Expand Down
43 changes: 39 additions & 4 deletions airport/airport.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@
function createAirport(name, airlines, availableGates) {
return {
name: name,
airlines: airlines,
availableGates: availableGates,
get message() {
if (this.availableGates > 0) {
return `Success! Current availability is ${this.availableGates}.`;
} else {
return `Oh no! Not enough gates available. Current overflow is ${Math.abs(this.overflow)}.`;
}
}
};
}

function welcomeGuests(airport) {
return `Welcome to ${airport.name}!`;
}

function landPlanes(airport, gateCount) {
airport.availableGates -= gateCount;
if (airport.availableGates < 0) {
airport.overflow = airport.availableGates;
airport.availableGates = 0;
}
return airport;
}

function checkAirlineLocations(airports, airline) {
const airportsFliesTo = [];
for (i=0; i < airports.length; i++) {
if (airports[i].airlines.includes(airline)) {
airportsFliesTo.push(airports[i].name);
}
}
return airportsFliesTo;
}

module.exports = {
// createAirport,
// welcomeGuests,
// landPlanes,
// checkAirlineLocations
createAirport,
welcomeGuests,
landPlanes,
checkAirlineLocations
};
6 changes: 3 additions & 3 deletions birthdays/birthdays-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var assert = require('chai').assert;
var { createBirthday, celebrateBirthday, countBirthdays } = require('./birthdays');

describe('Birthdays', function() {
it.skip('should create birthdays', function() {
it('should create birthdays', function() {
var leahBirthday = createBirthday('Leah', 2, 10);
var christyBirthday = createBirthday('Christy', 3, 8);

Expand All @@ -15,7 +15,7 @@ describe('Birthdays', function() {
assert.deepEqual(christyBirthday.day, 8);
});

it.skip('should celebrate birthdays', function() {
it('should celebrate birthdays', function() {
var alexBirthday = createBirthday('Alex', 5, 19);

var celebrateAlex = celebrateBirthday(alexBirthday);
Expand All @@ -29,7 +29,7 @@ describe('Birthdays', function() {
assert.equal(celebrateHeather, 'Today is 6/29! Happy birthday, Heather!');
})

it.skip('should count how many birthdays are in a given month', function() {
it('should count how many birthdays are in a given month', function() {
var leahBirthday = createBirthday('Leah', 2, 10);
var christyBirthday = createBirthday('Christy', 3, 8);
var alexBirthday = createBirthday('Alex', 5, 19);
Expand Down
26 changes: 25 additions & 1 deletion birthdays/birthdays.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
function createBirthday(name, month, day) {
return {
name: name,
month: month,
day: day
}
}

function celebrateBirthday(birthday) {
return `Today is ${birthday.month}/${birthday.day}! Happy birthday, ${birthday.name}!`
}

module.exports = { };
function countBirthdays(birthdays, month) {
count = 0;
for (i = 0; i < birthdays.length; i++) {
if (birthdays[i].month == month) {
count += 1;
}
}
return count
}

module.exports = {
createBirthday,
celebrateBirthday,
countBirthdays
};
16 changes: 8 additions & 8 deletions dj/dj-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ var { createSong, playSong, makePlaylist, addSongToPlaylist, playSongs, playFavo
var assert = require('chai').assert;

describe('dj', function() {
it.skip('should be able to create songs', function() {
it('should be able to create songs', function() {
var song = createSong('Zombie Shuffle', 'The Creepy Crawlers', true)

assert.equal(song.name, 'Zombie Shuffle');
assert.equal(song.artist, 'The Creepy Crawlers');
assert.equal(song.favorite, true);
})

it.skip('should not have been played by default', function() {
it('should not have been played by default', function() {
var song = createSong('Witches\' Brew Boogie', 'The Ghostly Ghouls', true)

assert.equal(song.name, 'Witches\' Brew Boogie');
Expand All @@ -19,14 +19,14 @@ describe('dj', function() {
assert.equal(song.hasBeenPlayed, false);
})

it.skip('should not be a favorite by default', function() {
it('should not be a favorite by default', function() {
var song = createSong('Witches\' Brew Boogie', 'The Ghostly Ghouls')

assert.equal(song.favorite, false);
})


it.skip('should be able to play a song', function() {
it('should be able to play a song', function() {
var song = createSong('I Put A Spell On You', 'Bette Midler, Sarah Jessica Parker & Kathy Najimy')

assert.equal(song.name, 'I Put A Spell On You');
Expand All @@ -39,7 +39,7 @@ describe('dj', function() {
assert.equal(playedSong.hasBeenPlayed, true);
})

it.skip('should be able to create a playlist', function() {
it('should be able to create a playlist', function() {
var skeletonSong = createSong('Skeletons in the Closet Rock', 'The Skeletal Band');
var tangoTrack = createSong('Trick or Treat Tango', 'The Spooky Cats');

Expand All @@ -49,7 +49,7 @@ describe('dj', function() {
assert.deepEqual(playlist.songs, [skeletonSong, tangoTrack])
})

it.skip('should be able to add songs to a playlist', function() {
it('should be able to add songs to a playlist', function() {
var jingleJive = createSong('Jingle Bell Jive', 'The Dancing Elves');

var holidayPlaylist = makePlaylist('Holiday Songs', [jingleJive]);
Expand All @@ -64,7 +64,7 @@ describe('dj', function() {
assert.deepEqual(updatedHolidayPlaylist.songs, [jingleJive, funkyFrosty])
})

it.skip('should be able to play all the songs', function() {
it('should be able to play all the songs', function() {
var rockinSong = createSong('Rockin\' Around the Christmas Treehouse', 'The Yuletide Youth');
var shuffleSong = createSong('Santa\'s Sleigh Ride Shuffle', 'The Jolly Jinglesters')
var reggaeSong = createSong('Rudolph\'s Reggae Jam', 'The Reindeer Rhythms')
Expand All @@ -78,7 +78,7 @@ describe('dj', function() {
assert.equal(updatedHolidayPlaylist.songs[2].hasBeenPlayed, true)
})

it.skip('should be able to play only the favorites if specified', function() {
it('should be able to play only the favorites if specified', function() {
var rockinSong = createSong('Rockin\' Around the Christmas Treehouse', 'The Yuletide Youth', true);
var shuffleSong = createSong('Santa\'s Sleigh Ride Shuffle', 'The Jolly Jinglesters')
var reggaeSong = createSong('Rudolph\'s Reggae Jam', 'The Reindeer Rhythms', true)
Expand Down
50 changes: 45 additions & 5 deletions dj/dj.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,48 @@
function createSong(name, artist, favorite = false) {
return {
name: name,
artist: artist,
favorite: favorite,
hasBeenPlayed: false,
}
}

function playSong(song) {
song.hasBeenPlayed=true;
return song;
}

function makePlaylist(name, songs) {
return {
name: name,
songs: songs,
}
}

function addSongToPlaylist(playlist, song) {
playlist.songs.push(song);
return playlist
}

function playSongs(playlist, specs) {
if (specs) {
for (var i = 0; i < playlist.songs.length; i++) {
if (playlist.songs[i].favorite) {
playSong(playlist.songs[i]);
}
}
} else {
for (var i = 0; i < playlist.songs.length; i++) {
playSong(playlist.songs[i]);
}
}
return playlist;
}

module.exports = {
// createSong,
// playSong,
// makePlaylist,
// addSongToPlaylist,
// playSongs
createSong,
playSong,
makePlaylist,
addSongToPlaylist,
playSongs
};
20 changes: 10 additions & 10 deletions favorite-foods/favorite-foods-test.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
var { createFavoriteFood } = require('./favorite-foods');
var { createFavoriteFood, commentOnSpiciness, orderFood, createShoppingList } = require('./favorite-foods');
var assert = require('chai').assert;

describe('favorite foods', function () {
it.skip('should create a new dish with a name', function () {
it('should create a new dish with a name', function () {
var pizza = createFavoriteFood({ dish: 'Pizza' });

assert.equal(pizza.name, 'Pizza');
});

it.skip('should be able to create a different dish', function () {
it('should be able to create a different dish', function () {
var smoothie = createFavoriteFood({ dish: 'Smoothie' });

assert.equal(smoothie.name, 'Smoothie');
});

it.skip('should have ingredients', function () {
it('should have ingredients', function () {
var tacos = createFavoriteFood({ dish: 'Tacos', ingredients: ['Tortilla', 'Ground Beef', 'Lettuce', 'Tomatoes', 'Sour Cream', 'Salsa'] });

assert.equal(tacos.name, 'Tacos');
assert.deepEqual(tacos.ingredients, ['Tortilla', 'Ground Beef', 'Lettuce', 'Tomatoes', 'Sour Cream', 'Salsa']);
});

it.skip('should be able to have different ingredients', function () {
it('should be able to have different ingredients', function () {
var burger = createFavoriteFood({ dish: 'Burger', ingredients: ['Bun', 'Beef Patty', 'Lettuce', 'Tomato', 'Cheese', 'Ketchup', 'Mustard'] });
var sushi = createFavoriteFood({ dish: 'Sushi', ingredients: ['Rice', 'Salmon', 'Tuna', 'Avocado', 'Cucumber', 'Soy Sauce', 'Wasabi'] });

Expand All @@ -32,7 +32,7 @@ describe('favorite foods', function () {
assert.deepEqual(sushi.ingredients, ['Rice', 'Salmon', 'Tuna', 'Avocado', 'Cucumber', 'Soy Sauce', 'Wasabi']);
});

it.skip('should be spicy or not', function () {
it('should be spicy or not', function () {
var pancakes = createFavoriteFood({ dish: 'Pancakes', ingredients: ['Flour', 'Egg', 'Milk', 'Butter', 'Maple Syrup'], isSpicy: false });
var padThai = createFavoriteFood({ dish: 'Pad Thai', ingredients: ['Rice Noodles', 'Shrimp', 'Tofu', 'Egg', 'Bean Sprouts', 'Peanuts', 'Lime'], isSpicy: true });

Expand All @@ -45,7 +45,7 @@ describe('favorite foods', function () {
assert.equal(padThai.isSpicy, true);
});

it.skip('should be able to taste the food and comment on how spicy it is', function () {
it('should be able to taste the food and comment on how spicy it is', function () {
var dish1 = createFavoriteFood({ dish: 'Pho', ingredients: ['Rice Noodles', 'Beef', 'Bean Sprouts', 'Basil', 'Lime', 'Sriracha'], isSpicy: true });
var dish2 = createFavoriteFood({ dish: 'Lasagna', ingredients: ['Lasagna Noodles', 'Ground Beef', 'Tomato Sauce', 'Ricotta Cheese', 'Mozzarella Cheese'], isSpicy: false });

Expand All @@ -56,13 +56,13 @@ describe('favorite foods', function () {
assert.equal(comment2, 'Phew, this Lasagna is not very spicy.');
});

it.skip('should start off having ordered 0 times', function () {
it('should start off having ordered 0 times', function () {
var dish = createFavoriteFood('Falafel', ['Chickpeas', 'Garlic', 'Onion', 'Cumin', 'Tahini', 'Pita Bread'], true);

assert.equal(dish.timesOrdered, 0);
});

it.skip('should be able to order dishes', function () {
it('should be able to order dishes', function () {
var dish1 = createFavoriteFood({ dish: 'Fish and Chips', ingredients: ['Fish Fillet', 'Potatoes', 'Flour', 'Egg', 'Beer', 'Tartar Sauce'], isSpicy: false });
var dish2 = createFavoriteFood({ dish: 'Chicken Curry', ingredients: ['Chicken', 'Coconut Milk', 'Onion', 'Garlic', 'Rice'], isSpicy: true });
var dish3 = createFavoriteFood({ dish: 'Ice Cream', ingredients: ['Milk', 'Cream', 'Sugar', 'Vanilla Extract', 'Chocolate Chips'], isSpicy: false });
Expand All @@ -81,7 +81,7 @@ describe('favorite foods', function () {
})

// spicy 🌶️
it.skip('should be able to make a list of all ingredients needed for multiple dishes', function () {
it('should be able to make a list of all ingredients needed for multiple dishes', function () {
var pizza = createFavoriteFood({ dish: 'Pizza', ingredients: ['Tomato Sauce', 'Cheese', 'Pepperoni', 'Mushrooms'], isSpicy: false });
var smoothie = createFavoriteFood({ dish: 'Smoothie', ingredients: ['Banana', 'Strawberry', 'Blueberry', 'Milk', 'Honey'], isSpicy: false })

Expand Down
Loading