diff --git a/front/src/components/Game.vue b/front/src/components/Game.vue index 62593c0..5820916 100644 --- a/front/src/components/Game.vue +++ b/front/src/components/Game.vue @@ -72,18 +72,34 @@ const updateGame = () => { target_icons.value = shuffle_array(icons) colors.value = [random_сolor(), random_сolor(), random_сolor(), random_сolor()] } + +const coor = (n: number) => { + let x = 0 + let y = 0 + + const groups = [ + { x: [100, 1400], y: [100, 300] }, + { x: [1400, 1600], y: [100, 800] }, + { x: [100, 1600], y: [700, 800] }, + { x: [100, 200], y: [100, 800] }, + ] + const d = groups[n] + x = getRandomIntInclusive(d.x[0], d.x[1]) + y = getRandomIntInclusive(d.y[0], d.y[1]) + return { x, y } +}