Add ship design constants in the shared module

This commit is contained in:
Oliver Akins 2022-03-07 23:35:56 -06:00
parent ad9ad389b6
commit d1e37d8fec
No known key found for this signature in database
GPG key ID: 3C2014AF9457AF99
3 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,17 @@
import { IColour } from "../types/Colour";
/**
* The colours that can be used by the user to make their ship unique. Each
* player is assigned a random, unused, colour when they join the lobby.
*/
export const colours: IColour[] = [
{ name: "Green", hex: "#00aa00" },
{ name: "Blue", hex: "#0077b6" },
{ name: "Red", hex: "#cb0b0a" },
{ name: "Purple", hex: "#7400b8" },
{ name: "Orange", hex: "#faa307" },
{ name: "Light Green", hex: "#9ef01a" },
{ name: "Magenta", hex: "#b7094c" },
{ name: "Pink", hex: "#f72585" },
{ name: "Yellow", hex: "#f9c80e" },
];

View file

@ -0,0 +1,22 @@
import { ISpaceship } from "../types/Spaceship";
/**
* The spaceships that are supported in the system, the "id" property **must**
* exist in the spaceship.svelte file as an icon, otherwise the "space-shuttle"
* icon will be used. The first icon in this list will be used by the server to
* assign new players' ship icon.
*/
export const spaceships: ISpaceship[] = [
{
name: "Space Shuttle",
id: "space-shuttle"
},
{
name: "Rocket",
id: "rocket"
},
{
name: "Sailboat",
id: "sailboat"
},
];

View file

@ -4,6 +4,10 @@
// Algorithms // Algorithms
export * from "./algorithms/movementDirection"; export * from "./algorithms/movementDirection";
// Data
export * from "./data/colours";
export * from "./data/spaceships";
// Data Structures // Data Structures
export * from "./types/Colour"; export * from "./types/Colour";
export * from "./types/Spaceship"; export * from "./types/Spaceship";