-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
303 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
// Place your cosmic workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and | ||
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope | ||
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is | ||
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | ||
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. | ||
// Placeholders with the same ids are connected. | ||
// Example: | ||
// "Print to console": { | ||
// "scope": "javascript,typescript", | ||
// "prefix": "log", | ||
// "body": [ | ||
// "console.log('$1');", | ||
// "$2" | ||
// ], | ||
// "description": "Log output to console" | ||
// } | ||
|
||
"cheader": { | ||
"scope": "javascript,typescript", | ||
"prefix": "cheader", | ||
"body": [ | ||
"/**", | ||
" * COSMIC PROJECT", | ||
" * ", | ||
" * $0", | ||
" */" | ||
], | ||
"description": "Cosmic header" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* COSMIC PROJECT | ||
* | ||
* Cake factory module | ||
*/ | ||
|
||
const { Cake, FoodItem, Item } = require('./CosmicTypes'); | ||
|
||
const { cakes } = require('./CosmicCakes'); | ||
|
||
class CosmicCakeFactory { | ||
static generateRandomCake() { | ||
let c = cakes[Math.floor(Math.random() * cakes.length)]; | ||
return c; | ||
} | ||
} | ||
|
||
export { | ||
CosmicCakeFactory | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/** | ||
* COSMIC PROJECT | ||
* | ||
* Cakes | ||
*/ | ||
|
||
const { Cake } = require('./CosmicTypes'); | ||
|
||
export const cakes: Array<typeof Cake> = [ | ||
{ | ||
id: 'cake_chocolate', | ||
displayName: 'Chocolate Cake', | ||
emoji: '🎂', | ||
count: 1, | ||
edible: true, | ||
icing: 'chocolate', | ||
filling: 'chocolate' | ||
}, | ||
{ | ||
id: 'cake_vanilla', | ||
displayName: 'Vanilla Cake', | ||
emoji: '🍰', | ||
count: 1, | ||
edible: true, | ||
icing: 'white', | ||
filling: 'vanilla', | ||
topping: 'cherry' | ||
}, | ||
{ | ||
id: 'cupcake_strawberry', | ||
displayName: 'Strawberry Cupcake', | ||
emoji: '🧁', | ||
count: 1, | ||
edible: true, | ||
icing: 'pink', | ||
filling: 'chocolate', | ||
topping: 'strawberry' | ||
}, | ||
{ | ||
id: 'cake_angel', | ||
displayName: 'Angel Food Cake', | ||
emoji: '😇', | ||
count: 1, | ||
edible: true, | ||
icing: 'white', | ||
filling: 'vanilla', | ||
topping: 'fruit' | ||
}, | ||
{ | ||
id: 'cake_carrot', | ||
displayName: 'Carrot Cake', | ||
emoji: '🥕', | ||
count: 1, | ||
edible: true, | ||
icing: 'white', | ||
filling: 'carrot' | ||
}, | ||
{ | ||
id: 'cake_velvet', | ||
displayName: 'Red Velvet Cake', | ||
emoji: '❤', | ||
count: 1, | ||
edible: true, | ||
icing: 'white', | ||
filling: 'red' | ||
}, | ||
{ | ||
id: 'cake_sponge', | ||
displayName: 'Sponge Cake', | ||
emoji: '🧽', | ||
count: 1, | ||
edible: true, | ||
icing: 'none', | ||
filling: 'lemon' | ||
}, | ||
{ | ||
id: 'cake_pineapple', | ||
displayName: 'Pineapple Upside-Down Cake', | ||
emoji: '🍍', | ||
count: 1, | ||
edible: true, | ||
icing: 'none', | ||
filling: 'pineapple', | ||
topping: 'pineapple' | ||
}, | ||
{ | ||
id: 'cake_fruit', | ||
displayName: 'Fruit Cake', | ||
emoji: '🎄', | ||
count: 1, | ||
edible: true, | ||
icing: 'none', | ||
filling: 'fruit', | ||
topping: 'nuts' | ||
}, | ||
{ | ||
id: 'cake_birthday', | ||
displayName: 'Birthday Cake', | ||
emoji: '🎂', | ||
count: 1, | ||
edible: true, | ||
icing: 'chocolate', | ||
filling: 'chocolate', | ||
topping: 'candle' | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters