From 42dbfba1ebcb48456b133ba98a793376dad1aa00 Mon Sep 17 00:00:00 2001 From: ZaneMODell <94186155+ZaneMODell@users.noreply.github.com> Date: Sat, 9 Apr 2022 15:50:42 -0400 Subject: [PATCH 01/28] Updated HTML and Working on Javascript itinerary list --- app.js | 34 +++++++++++++++++++++++++++++----- index.html | 24 +++++++++++++++++++++--- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/app.js b/app.js index 2474b89..f836a99 100644 --- a/app.js +++ b/app.js @@ -30,21 +30,45 @@ var bed_time; function assignPreferences(){ - var userInput = document.getElementById('dd').value; - alert(userInput)} + city_travelled = some shit idk; +// name, open_time, close_time, cost_scale, radius, local // let Udon_Sushi_Restaurant = new Attraction("Udon_Sushi_Restaurant", 12, 20, 3, 3, true) // let Omi_Sushi = new Attraction("Omi_Sushi", 11, 20, 2, 1, true) // let East_Cafe = new Attraction("East_Cafe", 5, 24, 2, 3, true) // let Royal_Pot = new Attraction("Royal_Pot", 10, 24, 2, 2, true) + +//AMERICAN +let Olympic_Broil = new Attraction("Olympic Broil", 11, 20, 1, 6.2, true) let Buffalo_Wild_Wings = new Attraction("Buffalo_Wild_Wings", 11, 24, 2, 1, false) let iHop = new Attraction("iHop", 7, 15, 2, 1, false) -let +let Red_Haven = new Attraction("Red Haven", 17, 20, 3, 2.3, true) + +//ITALIAN +let Sidebar = new Attraction("Sidebar", 12, 0, 1, 2.5, true) +let Jets_Pizza = new Attraction("Jet's Pizza", 10, 22, 2, 2.2, false) +let Andiamo_Fenton = new Attraction("Andiamo Fenton", 15, 22, 3, 60, true) + +//Indoor Activities +let Spare_Time = new Attraction("Spare Time", 13, 23, 2, 2.2, true) + +//Outdoor Activities +let Horticulture_Gardens = new Attraction("Horticulture Gardens", 6, 22, 1, 1, true) var data_dict = { -"cusine": {"Japanese": [Udon_Sushi_Restaurant, Omi_Sushi], "Chinese": [East_Cafe, Royal_Pot], "American": [Buffalo_Wild_Wings, iHop]}, -"sightseeing": {} +"Food": {"American": [Olympic_Broil, Buffalo_Wild_Wings, iHop, Red_Haven], "Italian": [Sidebar, Jets_Pizza, Andiamo_Fenton]}, +"Indoor": {Spare_Time}, "Outdoor": {Horticulture_Gardens} +} + + +var itinerary_list = [] + +for (let key = 0; key < length(data_dict); key++){ + var value = data_dict[key]; + for (let activity = 0; activity < length(value); activity++){ + + } } diff --git a/index.html b/index.html index 43a876c..2337650 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - Just a title.... + @@ -12,8 +12,26 @@

Entertainweeeee

Welcome to Entertainwe! What is your name?

- + +
+ +
+

Itinerary Preferences:

+ + + +
+ + + +
+ + + +
+
- \ No newline at end of file From 1a8adff2279ea7448ce7203111549d13715f6823 Mon Sep 17 00:00:00 2001 From: ZaneMODell <94186155+ZaneMODell@users.noreply.github.com> Date: Sat, 9 Apr 2022 17:10:41 -0400 Subject: [PATCH 02/28] Began for loop iterations and HTML Upgrade --- app.js | 34 ++++++++++++++++++++++------------ index.html | 46 ++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 64 insertions(+), 16 deletions(-) diff --git a/app.js b/app.js index f836a99..b5d23f4 100644 --- a/app.js +++ b/app.js @@ -1,12 +1,13 @@ class Attraction { - constructor(name, open_time, close_time, cost_scale, radius, local ) { + constructor(name, open_time = 0, close_time = 0, cost_scale = 1, radius = 0, local = false) { this.name = name; - this.open_time = 0 - this.close_time = 0 - this.cost_scale = 1 - this.radius = 0 - this.local = true + this.open_time = open_time + this.close_time = close_time + this.cost_scale = cost_scale + this.radius = radius + this.local = local + this.activity_level = 0 } } @@ -30,8 +31,8 @@ var bed_time; function assignPreferences(){ - city_travelled = some shit idk; - + +} // name, open_time, close_time, cost_scale, radius, local // let Udon_Sushi_Restaurant = new Attraction("Udon_Sushi_Restaurant", 12, 20, 3, 3, true) @@ -63,12 +64,21 @@ var data_dict = { } -var itinerary_list = [] +var itinerary_list = []; for (let key = 0; key < length(data_dict); key++){ - var value = data_dict[key]; - for (let activity = 0; activity < length(value); activity++){ - + var add_count; + var activity_list = data_dict[key]; + for (let i = 0; i < length(value); i++){ + if ((activity_list)[i].activity_level <= activity_level){ + add_count += 1; + } + if ((activity_list)[i].radius <= preferred_radius){ + add_count += 1; + } + if ((activity_list)[i].cost_scale <= budget_range){ + add_count += 1; + } } } diff --git a/index.html b/index.html index 2337650..196a952 100644 --- a/index.html +++ b/index.html @@ -14,13 +14,21 @@

Entertainweeeee

- -
+ +

Itinerary Preferences:

- + + +
+ + +
@@ -32,6 +40,36 @@

Itinerary Preferences:


+ + +
+ + +
+ + 0 miles +
+ + +
+ +
+ + +
+ + + +
+ + + +
+ + + +
+
\ No newline at end of file From cff4fd6fc697d2d862d977e75271785db3134f92 Mon Sep 17 00:00:00 2001 From: ZaneMODell <94186155+ZaneMODell@users.noreply.github.com> Date: Sat, 9 Apr 2022 17:16:15 -0400 Subject: [PATCH 03/28] Added style.css and updated index.html --- index.html | 7 +++++++ style.css | 31 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 style.css diff --git a/index.html b/index.html index 196a952..097c7f7 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,13 @@ + +

Entertainweeeee

Welcome to Entertainwe! What is your name?

diff --git a/style.css b/style.css new file mode 100644 index 0000000..3892254 --- /dev/null +++ b/style.css @@ -0,0 +1,31 @@ +ul { + list-style-type: none; + margin: 3; + padding: 0; + overflow: hidden; + background-color: #81c8f5; + border-radius: 25px; + } + + li { + float: left; + } + + li a { + display: block; + font-weight: bold; + font-size: 22px; + color: rgb(12, 12, 12); + text-align: center; + padding: 14px 16px; + text-decoration: none; + } + + li a:hover:not(.active) { + background-color: #c5eff7; + } + + .active { + background-color: #81c8f5; + + } \ No newline at end of file From a74224215056469aaa1f3d6ccd06a2f40b968146 Mon Sep 17 00:00:00 2001 From: ZaneMODell <94186155+ZaneMODell@users.noreply.github.com> Date: Sat, 9 Apr 2022 17:46:15 -0400 Subject: [PATCH 04/28] Changed slider value --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 097c7f7..3946ec6 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@

Itinerary Preferences:


- 0 miles + 10 miles
From 5ea4d7589ae73174274d036ca438f2caa13af0bc Mon Sep 17 00:00:00 2001 From: ZaneMODell <94186155+ZaneMODell@users.noreply.github.com> Date: Sat, 9 Apr 2022 18:12:59 -0400 Subject: [PATCH 05/28] added conditional for food preferences --- app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index b5d23f4..632cb1c 100644 --- a/app.js +++ b/app.js @@ -31,7 +31,7 @@ var bed_time; function assignPreferences(){ - + } // name, open_time, close_time, cost_scale, radius, local @@ -79,6 +79,9 @@ for (let key = 0; key < length(data_dict); key++){ if ((activity_list)[i].cost_scale <= budget_range){ add_count += 1; } + if (activity_list.key in food_preferences){ + + } } } From 64f8faf4a01a8545be668bc307dbef4dc3f9d8f0 Mon Sep 17 00:00:00 2001 From: emilygoldwater <94126725+emilygoldwater@users.noreply.github.com> Date: Sat, 9 Apr 2022 20:03:26 -0400 Subject: [PATCH 06/28] Update index.html --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index 3946ec6..784f219 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,7 @@ +