-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathboring-fruit.js
188 lines (169 loc) · 4.22 KB
/
boring-fruit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
function getItemFromList(mutableObject){
var upperLimit = mutableObject.cloned_array.length;
if(upperLimit === 0){
mutableObject.cloned_array = mutableObject.original.slice(0);
upperLimit = mutableObject.cloned_array.length;
}
var lowerLimit = 0;
var randomIndex = Math.floor(Math.random() * (upperLimit - lowerLimit) + lowerLimit);
return mutableObject.cloned_array.splice(randomIndex, 1); //Remove an object each time
}
function buildActivityList(listContainer){
listContainer.empty();
var compiledList = [];
var activities = [];
//Get three indoor
activities.push(getItemFromList(indoor_obj));
activities.push(getItemFromList(indoor_obj));
activities.push(getItemFromList(indoor_obj));
//Get three outdoor
activities.push(getItemFromList(outdoor_obj));
activities.push(getItemFromList(outdoor_obj));
activities.push(getItemFromList(outdoor_obj));
//Get one making suggestion
activities.push(getItemFromList(making_obj));
//Get one Outings suggestion
activities.push(getItemFromList(outings_obj));
activities.forEach(function(element, index){
if(index === 0){
compiledList.push("<li class='fruit-heading'>INDOORS</li>");
}
if(index === 3){
compiledList.push("<li class='fruit-heading'>OUTDOORS</li>");
}
if(index === 6){
compiledList.push("<li class='fruit-heading'>MAKING GAME</li>");
}
if(index === 7){
compiledList.push("<li class='fruit-heading'>OUTING</li>");
}
compiledList.push("<li>"+element+"</li>");
})
listContainer.append(compiledList);
}
$(function() {
$("#getBoringIdeas").click(function(e){
buildActivityList($("#boringList"));
e.preventDefault();
});
});
var mystery_outings = [
"Tyntesfield",
"Goblin Coombe",
"Sand Bay",
"Cheddar lake",
"Bristol museum",
"Weston museum",
"Bishops palace, Wells",
"Arnos Vale cemetery",
"Helicopter museum",
"Hestercombe gardens",
"Nailsea swimming pool",
"Kewstoke woods",
"Clevedon SaltHouse fields",
"Walk on Clevedon pier",
"Walk on Portishead Prom",
"M Shed museum",
"SS Great Britain",
];
// Ideas to google
// - Nearby beaches
// - Nearby woodland
// - Waterpark or adventure swimming pool
// - Soft play, trampoling or indoor jungle gym
// - Museums and libraries
// - Stately homes and gardens
// - Playparks in Bristol area
//Need 48 examples of each indoor/outdoor
var outdoor_activities = [
"Watering the garden",
"Painting",
"Hula hoops",
"Mud kitchen",
"Sand pit",
"Balance bike",
"Take frisbee to park",
"Take scooter to park",
"Bubbles",
"Football",
"Croquet",
"Kick leaves in the park",
"Giant floor chalk",
"Build a tee pee",
"Build a wooden den",
"Pond dipping",
"Lawn mower",
"Roller ball painting",
"Homemade sprinkler",
"Pouring station",
"Look for minibeasts",
];
// TODO
// - Type out all ideas from index cards
// - Write up all new toy acquisitions
var indoor_activities = [
"Watering the garden",
"Play doh",
"Wooden toys",
"Plastic toys",
"Toy garage",
"Wheelie bug",
"Ball pit",
"Toddler bags",
"Random toys",
"Duplo",
"Homemade toys",
"Brio",
"Playmobil",
"Noah's ark",
"Pencils and crayons",
"Chalkboard paint",
"Soft toy tub",
"Space station",
"Read a book",
"Listen to music",
"Do a dance",
"Alphabet cards",
"Make a fort",
"Build a tower",
"Play with the cats",
"Threading set",
"Busy board",
"Light up toys",
"Balloons",
"Alphabet fishing",
"Skittles",
"Music makers",
"Build a tower",
];
// Ideas to google
// - Toddler craft activities
// - Making projects
// - Homemade toy ideas from list
var making_games = [
"Ball run",
"water run",
"Ball sorting coloured tubes",
"Build a tower of recycling",
"Baking",
"Rice bin sensory ideas",
"Coloured rice",
"Making coloured popsicle and velcro",
"Art box ideas",
"Kitchen plastic",
"Hand and feet painting",
"Sponge painting",
"Bicarb and vinegar painting",
"Bubble painting",
];
// TODO use cloned mutable lists and when list runs out re-clone original. Need to pass reference to original
function makeMutableObjects(arrayName){
return {
original: arrayName,
cloned_array: arrayName.slice(0)
}
}
var outings_obj = makeMutableObjects(mystery_outings);
var outdoor_obj = makeMutableObjects(outdoor_activities);
var indoor_obj = makeMutableObjects(indoor_activities);
var making_obj = makeMutableObjects(making_games);