Skip to content

Commit

Permalink
Add words as a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
instantfred committed Aug 7, 2024
1 parent 417e4c3 commit cce4d94
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 41 deletions.
43 changes: 2 additions & 41 deletions src/SounddittoGame.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,12 @@ import React, { useState, useEffect } from 'react';
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardHeader } from "@/components/ui/card"
import { Switch } from "@/components/ui/switch"
import englishWords from './lib/englishWords';
import spanishWords from './lib/spanishWords';

const GAME_DURATION = 60; // Game duration in seconds
const SKIP_PENALTY = 5; // Time penalty for skipping in seconds

const englishWords = [
{ easy: "Pidgeon", hard: "Dentist Drill" },
{ easy: "Serpiente", hard: "Blender" },
{ easy: "Mouse", hard: "Earthquake" },
{ easy: "Heartbeat", hard: "Zombie" },
{ easy: "Bell", hard: "Camera" },
{ easy: "Hiccup", hard: "Panda" },
{ easy: "Bee", hard: "Footsteps" },
{ easy: "Train", hard: "Broom" },
{ easy: "Dinosaur", hard: "Saxophone" },
{ easy: "Kiss", hard: "Tornado" },
{ easy: "Monster", hard: "Scissors" },
{ easy: "Police Car", hard: "Popcorn" },
{ easy: "Drinking", hard: "Boxing" },
{ easy: "Guitar", hard: "Bus" },
{ easy: "Doorbell", hard: "Cricket" },
{ easy: "Whip", hard: "Seagull" },
{ easy: "Fart", hard: "Bubbles" },
];

const spanishWords = [
{ easy: "Paloma", hard: "Taladro de dentista" },
{ easy: "Serpiente", hard: "Licuadora" },
{ easy: "Ratón", hard: "Terremoto" },
{ easy: "Latido del corazón", hard: "Zombi" },
{ easy: "Campana", hard: "Cámara" },
{ easy: "Hipo", hard: "Panda" },
{ easy: "Abeja", hard: "Pasos" },
{ easy: "Tren", hard: "Escoba" },
{ easy: "Dinosaurio", hard: "Saxofón" },
{ easy: "Beso", hard: "Tornado" },
{ easy: "Monstruo", hard: "Tijeras" },
{ easy: "Auto de policía", hard: "Palomitas de maíz" },
{ easy: "Beber", hard: "Boxeo" },
{ easy: "Guitarra", hard: "Autobús" },
{ easy: "Timbre", hard: "Grillo" },
{ easy: "Látigo", hard: "Gaviota" },
{ easy: "Pedo", hard: "Burbujas" },
];


const SounddittoGame = () => {
const [gameState, setGameState] = useState('waiting');
const [currentWords, setCurrentWords] = useState({ easy: '', hard: '' });
Expand Down
43 changes: 43 additions & 0 deletions src/lib/englishWords.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const englishWords = [
{ easy: "Pidgeon", hard: "Dentist Drill" },
{ easy: "Snake", hard: "Blender" },
{ easy: "Mouse", hard: "Earthquake" },
{ easy: "Heartbeat", hard: "Zombie" },
{ easy: "Bell", hard: "Camera" },
{ easy: "Hiccup", hard: "Panda" },
{ easy: "Bee", hard: "Footsteps" },
{ easy: "Train", hard: "Broom" },
{ easy: "Dinosaur", hard: "Saxophone" },
{ easy: "Kiss", hard: "Tornado" },
{ easy: "Monster", hard: "Scissors" },
{ easy: "Police Car", hard: "Popcorn" },
{ easy: "Drinking", hard: "Boxing" },
{ easy: "Guitar", hard: "Bus" },
{ easy: "Doorbell", hard: "Cricket" },
{ easy: "Whip", hard: "Seagull" },
{ easy: "Fart", hard: "Bubbles" },
{ easy: "Rain", hard: "Chainsaw" },
{ easy: "Clock", hard: "Helicopter" },
{ easy: "Cat", hard: "Fireworks" },
{ easy: "Dog", hard: "Thunder" },
{ easy: "Wind", hard: "Motorcycle" },
{ easy: "Bird", hard: "Keyboard" },
{ easy: "Airplane", hard: "Water" },
{ easy: "Laugh", hard: "Explosion" },
{ easy: "Cough", hard: "Siren" },
{ easy: "Sneezing", hard: "Alarm" },
{ easy: "Typewriter", hard: "Chains" },
{ easy: "Clapping", hard: "Sea" },
{ easy: "Whistle", hard: "Elephant" },
{ easy: "Drums", hard: "Coffee Maker" },
{ easy: "Goat", hard: "Microwave" },
{ easy: "Rooster", hard: "Washing Machine" },
{ easy: "Pig", hard: "Hairdryer" },
{ easy: "Mosquito", hard: "Air Conditioner" },
{ easy: "Door", hard: "Car Crash" },
{ easy: "Tarzan", hard: "Michael Jackson" },
{ easy: "Yawn", hard: "Shower" },
{ easy: "Karete", hard: "Printer" },
];

export default englishWords;
43 changes: 43 additions & 0 deletions src/lib/spanishWords.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const spanishWords = [
{ easy: "Paloma", hard: "Taladro de dentista" },
{ easy: "Serpiente", hard: "Licuadora" },
{ easy: "Ratón", hard: "Terremoto" },
{ easy: "Latido del corazón", hard: "Zombi" },
{ easy: "Campana", hard: "Cámara" },
{ easy: "Hipo", hard: "Panda" },
{ easy: "Abeja", hard: "Pasos" },
{ easy: "Tren", hard: "Escoba" },
{ easy: "Dinosaurio", hard: "Saxofón" },
{ easy: "Beso", hard: "Tornado" },
{ easy: "Monstruo", hard: "Tijeras" },
{ easy: "Auto de policía", hard: "Palomitas de maíz" },
{ easy: "Beber", hard: "Boxeo" },
{ easy: "Guitarra", hard: "Autobús" },
{ easy: "Timbre", hard: "Grillo" },
{ easy: "Látigo", hard: "Gaviota" },
{ easy: "Pedo", hard: "Burbujas" },
{ easy: "Lluvia", hard: "Motosierra" },
{ easy: "Reloj", hard: "Helicóptero" },
{ easy: "Gato", hard: "Fuegos artificiales" },
{ easy: "Perro", hard: "Trueno" },
{ easy: "Viento", hard: "Motocicleta" },
{ easy: "Pájaro", hard: "Teclado" },
{ easy: "Avión", hard: "Agua" },
{ easy: "Risa", hard: "Explosión" },
{ easy: "Tos", hard: "Sirena" },
{ easy: "Estornudo", hard: "Alarma" },
{ easy: "Máquina de escribir", hard: "Cadenas" },
{ easy: "Aplausos", hard: "Mar" },
{ easy: "Silbido", hard: "Elefante" },
{ easy: "Tambores", hard: "Cafetera" },
{ easy: "Cabra", hard: "Microondas" },
{ easy: "Gallo", hard: "Lavadora" },
{ easy: "Cerdo", hard: "Secador de pelo" },
{ easy: "Mosquito", hard: "Aire acondicionado" },
{ easy: "Puerta", hard: "Accidente de auto" },
{ easy: "Tarzán", hard: "Michael Jackson" },
{ easy: "Bostezo", hard: "Ducha" },
{ easy: "Karate", hard: "Impresora" },
];

export default spanishWords;

0 comments on commit cce4d94

Please sign in to comment.