123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- const genGame = () => {
- const items = [];
- items.push({
- type: "image",
- content: "/game_assets/AS.jpg",
- backContent: "/game_assets/Red_back.jpg",
- text: "frontLabel",
- width: 100,
- x: 400,
- y: 400,
- actions: [
- "flip",
- "flipSelf",
- "tap",
- { name: "rotate", args: { angle: 25 } },
- "rotate45",
- "rotate90",
- "stack",
- "shuffle",
- "clone",
- "lock",
- "remove",
- ],
- });
- items.push({
- type: "image",
- content: "/game_assets/BH.jpg",
- backContent: "/game_assets/Red_back.jpg",
- text: "frontLabel",
- backText: "backLabel",
- width: 100,
- x: 410,
- y: 400,
- });
- items.push({
- type: "image",
- content: "/game_assets/JC.jpg",
- backContent: "/game_assets/Red_back.jpg",
- overlay: { content: "/game_assets/overlay.png" },
- width: 100,
- x: 420,
- y: 400,
- });
- items.push({
- type: "rect",
- color: "#00D022",
- width: 100,
- height: 100,
- x: 0,
- y: 0,
- });
- items.push({
- type: "rect",
- color: "#22D022",
- width: 80,
- height: 80,
- x: 10,
- y: 10,
- });
- items.push({
- type: "rect",
- color: "#ffffff",
- width: 80,
- height: 80,
- text: "test2",
- textColor: "#ccc",
- x: 400,
- y: 100,
- });
- items.push({
- type: "rect",
- color: "#000",
- width: 80,
- height: 80,
- text: "test4",
- textColor: "#ccc",
- x: 420,
- y: 120,
- });
- items.push({
- type: "round",
- color: "#D00022",
- text: "test",
- textColor: "#ccc",
- radius: 80,
- x: 500,
- y: 500,
- });
- items.push({
- type: "round",
- color: "#ffffff",
- radius: 80,
- text: "test3",
- textColor: "#ccc",
- x: 700,
- y: 400,
- });
- items.push({
- type: "round",
- color: "#000",
- radius: 80,
- text: "test4",
- textColor: "#ccc",
- x: 720,
- y: 400,
- });
- items.push({
- label: "Counter",
- type: "counter",
- color: "#D00022",
- x: 50,
- y: 50,
- });
- items.push({
- label: "Dice",
- type: "dice",
- color: "#D00022",
- x: 200,
- y: 50,
- });
- items.push({
- label: "Note",
- type: "note",
- color: "#ffc",
- x: 200,
- y: 200,
- });
- items.push({
- label: "My zone",
- type: "zone",
- layer: -1,
- width: 500,
- height: 300,
- locked: true,
- onItem: ["reveal"],
- x: 200,
- y: 600,
- });
- items.push({
- label: "My cube",
- type: "cube",
- size: 70,
- color: "#ff0000",
- x: 400,
- y: 550,
- });
- items.push({
- text: "My token",
- type: "token",
- size: 70,
- color: "#00ff00",
- x: 450,
- y: 600,
- });
- items.push({
- label: "My meeple",
- type: "meeple",
- size: 70,
- color: "#0000ff",
- x: 600,
- y: 650,
- });
- items.push({
- label: "My jewel",
- type: "jewel",
- size: 70,
- color: "#00ffff",
- x: 650,
- y: 550,
- });
- items.push({
- label: "My jewel",
- type: "jewel",
- size: 70,
- color: "#ff0000",
- x: 650,
- y: 600,
- });
- items.push({
- label: "Generator",
- type: "generator",
- layer: -1,
- x: 500,
- y: 700,
- item: {
- label: "My jewel",
- type: "jewel",
- size: 70,
- color: "#ff0000",
- },
- });
- return {
- items,
- availableItems: [
- {
- name: "Blue rect",
- label: "rect",
- type: "rect",
- color: "#0000D2",
- width: 80,
- height: 80,
- },
- {
- name: "First group",
- items: [
- {
- name: "Green rect",
- label: "rect",
- type: "rect",
- color: "#00D022",
- width: 80,
- height: 80,
- },
- {
- label: "Red rect",
- type: "rect",
- color: "#D00022",
- width: 80,
- height: 80,
- },
- ],
- },
- {
- name: "Second group",
- items: [
- {
- name: "Green pawn",
- label: "rect",
- type: "pawn",
- color: "#00D022",
- size: 80,
- },
- {
- name: "Red pawn",
- type: "pawn",
- color: "#D00022",
- size: 80,
- },
- {
- name: "blue pawn",
- type: "pawn",
- color: "#2000D2",
- size: 80,
- },
- {
- name: "Third nested group",
- items: [
- {
- name: "Green rect",
- label: "rect",
- type: "rect",
- color: "#00D022",
- width: 80,
- height: 80,
- },
- {
- name: "Red rect",
- type: "rect",
- color: "#D00022",
- width: 80,
- height: 80,
- },
- ],
- },
- ],
- },
- {
- name: "Green circle",
- label: "round",
- type: "round",
- color: "#00D022",
- size: 80,
- },
- {
- name: "Red circle",
- type: "round",
- color: "#D00022",
- size: 80,
- },
- ],
- board: {
- size: 1000,
- scale: 1,
- name: "Test Game",
- published: true,
- keepTitle: true,
- translations: [
- {
- language: "fr",
- name: "0 Jeu test",
- description: "Un jeu pour tester",
- baseline: "Un jeu de test",
- },
- ],
- playerCount: [2, 4],
- defaultName: "0 Test game",
- defaultLanguage: "en",
- defaultDescription: "A classic",
- defaultBaseline: "A test game",
- materialLanguage: "Multi-lang",
- minAge: "10",
- duration: [30, 90],
- imageUrl: "/game_assets/default.png",
- gridSize: 1,
- },
- id: "test",
- };
- };
- export const testGame = genGame();
- export default testGame;
|