testGame.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. const genGame = () => {
  2. const items = [];
  3. items.push({
  4. type: "image",
  5. content: "/games/AS.jpg",
  6. backContent: "/games/Red_back.jpg",
  7. text: "frontLabel",
  8. width: 100,
  9. x: 400,
  10. y: 400,
  11. actions: [
  12. "flip",
  13. "flipSelf",
  14. "tap",
  15. "rotate45",
  16. "rotate90",
  17. "stack",
  18. "shuffle",
  19. "clone",
  20. "lock",
  21. "remove",
  22. ],
  23. });
  24. items.push({
  25. type: "image",
  26. content: "/games/BH.jpg",
  27. backContent: "/games/Red_back.jpg",
  28. text: "frontLabel",
  29. backText: "backLabel",
  30. width: 100,
  31. x: 410,
  32. y: 400,
  33. });
  34. items.push({
  35. type: "image",
  36. content: "/games/JC.jpg",
  37. backContent: "/games/Red_back.jpg",
  38. overlay: { content: "/games/overlay.png" },
  39. width: 100,
  40. x: 420,
  41. y: 400,
  42. });
  43. items.push({
  44. type: "rect",
  45. color: "#00D022",
  46. width: 100,
  47. height: 100,
  48. x: 0,
  49. y: 0,
  50. });
  51. items.push({
  52. type: "rect",
  53. color: "#22D022",
  54. width: 80,
  55. height: 80,
  56. x: 10,
  57. y: 10,
  58. });
  59. items.push({
  60. type: "round",
  61. color: "#D00022",
  62. radius: 80,
  63. x: 500,
  64. y: 500,
  65. });
  66. items.push({
  67. label: "Counter",
  68. type: "counter",
  69. color: "#D00022",
  70. x: 50,
  71. y: 50,
  72. });
  73. items.push({
  74. label: "Dice",
  75. type: "dice",
  76. color: "#D00022",
  77. x: 200,
  78. y: 50,
  79. });
  80. items.push({
  81. label: "Note",
  82. type: "note",
  83. color: "#ffc",
  84. x: 200,
  85. y: 200,
  86. });
  87. items.push({
  88. label: "My zone",
  89. type: "zone",
  90. layer: -1,
  91. width: 500,
  92. height: 300,
  93. locked: true,
  94. x: 200,
  95. y: 600,
  96. });
  97. items.push({
  98. label: "My cube",
  99. type: "cube",
  100. size: 70,
  101. color: "#ff0000",
  102. x: 400,
  103. y: 550,
  104. });
  105. items.push({
  106. label: "My token",
  107. type: "token",
  108. size: 70,
  109. color: "#00ff00",
  110. x: 450,
  111. y: 600,
  112. });
  113. items.push({
  114. label: "My meeple",
  115. type: "meeple",
  116. size: 70,
  117. color: "#0000ff",
  118. x: 600,
  119. y: 650,
  120. });
  121. items.push({
  122. label: "My jewel",
  123. type: "jewel",
  124. size: 70,
  125. color: "#00ffff",
  126. x: 650,
  127. y: 550,
  128. });
  129. items.push({
  130. label: "My jewel",
  131. type: "jewel",
  132. size: 70,
  133. color: "#ff0000",
  134. x: 650,
  135. y: 600,
  136. });
  137. return {
  138. items,
  139. availableItems: [
  140. {
  141. groupId: "Group",
  142. label: "Rect",
  143. type: "rect",
  144. color: "#00D022",
  145. width: 80,
  146. height: 80,
  147. },
  148. ],
  149. board: {
  150. size: 1000,
  151. scale: 0.5,
  152. name: "Test Game",
  153. published: true,
  154. translations: [
  155. {
  156. language: "fr",
  157. name: "0 Jeu test",
  158. description: "Un jeu pour tester",
  159. },
  160. ],
  161. playerCount: [2, 4],
  162. defaultName: "0 Test game",
  163. defaultLanguage: "en",
  164. defaultDescription: "A classic",
  165. materialLanguage: "Multi-lang",
  166. minAge: "10",
  167. duration: [30, 90],
  168. imageUrl: "/games/testgame.png",
  169. gridSize: 1,
  170. },
  171. };
  172. };
  173. export const testGame = genGame();
  174. export default testGame;