{"id":24377832,"url":"https://github.com/jeysonht/snakegamewithjava","last_synced_at":"2026-05-22T04:04:07.097Z","repository":{"id":271972451,"uuid":"915145411","full_name":"JeysonhT/SnakeGameWithJava","owner":"JeysonhT","description":"Snake game created with java Swing","archived":false,"fork":false,"pushed_at":"2025-01-11T05:34:28.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-30T11:41:07.101Z","etag":null,"topics":["java","java-17","swing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JeysonhT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-11T04:52:30.000Z","updated_at":"2025-01-11T05:34:31.000Z","dependencies_parsed_at":"2025-01-19T06:17:16.266Z","dependency_job_id":null,"html_url":"https://github.com/JeysonhT/SnakeGameWithJava","commit_stats":null,"previous_names":["jeysonht/snakegamewithjava"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JeysonhT/SnakeGameWithJava","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeysonhT%2FSnakeGameWithJava","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeysonhT%2FSnakeGameWithJava/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeysonhT%2FSnakeGameWithJava/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeysonhT%2FSnakeGameWithJava/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JeysonhT","download_url":"https://codeload.github.com/JeysonhT/SnakeGameWithJava/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JeysonhT%2FSnakeGameWithJava/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33328625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","java-17","swing"],"created_at":"2025-01-19T06:17:07.255Z","updated_at":"2026-05-22T04:04:07.054Z","avatar_url":"https://github.com/JeysonhT.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snake Game en Java\n\nEste proyecto es una implementación del clásico juego Snake utilizando Java y Swing. El juego permite al usuario controlar una serpiente que debe alimentarse de manzanas, incrementando su longitud con cada comida. El objetivo es evitar chocar con las paredes o consigo misma.\n\n## Características\n\n- Movimiento de la serpiente controlado por las teclas de dirección (flechas).\n- Generación aleatoria de la manzana dentro del panel.\n- Crecimiento de la serpiente al comer una manzana.\n- Detección de colisión con las paredes y consigo misma.\n- Uso de `JPanel`, `JLabel`, y `Timer` para la lógica y el renderizado del juego.\n\n## Requisitos del sistema\n\n- **Java Development Kit (JDK)** 17\n- **IDE recomendado:** NetBeans, IntelliJ IDEA o Eclipse\n- **Sistema operativo:** Windows, macOS o Linux\n\n## Instalación y ejecución\n\n1. Clona este repositorio en tu máquina local:\n   ```bash\n   git clone https://github.com/JeysonhT/SnakeGameWithJava.git\n   ```\n2. Abre el proyecto en tu IDE preferido.\n3. Compila y ejecuta la clase principal `SnakeGame.java`.\n\n## Estructura del proyecto\n\n```\n|-- src\n|   |-- resources\n|   |   |-- greenSquare(1).png\n|   |   |-- redSquare(1).png\n|   |-- Snake.java\n|   |-- apple.java\n|   |-- Ventana.java\n|   |-- SnakeGame.java\n```\n\n- **Snake.java**: Clase que representa la serpiente, contiene la cabeza y el cuerpo.\n- **apple.java**: Clase que representa la manzana.\n- **Ventana.java**: Clase de la ventana de swing que maneja la interfaz gráfica y la lógica del juego.\n\n## Controles del juego\n\n- **Flecha arriba:** Mover la serpiente hacia arriba.\n- **Flecha abajo:** Mover la serpiente hacia abajo.\n- **Flecha izquierda:** Mover la serpiente hacia la izquierda.\n- **Flecha derecha:** Mover la serpiente hacia la derecha.\n\n## Mejoras futuras\n\n- Agregar niveles de dificultad.\n- Agregar efectos de sonido.\n- Permitir reiniciar el juego tras perder.\n\n## Contribución\n\nLas contribuciones son bienvenidas. Si deseas mejorar el juego o agregar nuevas características, sigue estos pasos:\n\n1. Haz un fork de este repositorio.\n2. Crea una rama nueva para tu función o mejora: `git checkout -b mejora-nueva`.\n3. Realiza tus cambios y haz un commit: `git commit -m 'Agrega nueva función'`.\n4. Envía un pull request.\n\n## Licencia\n\nEste proyecto está licenciado bajo la [MIT License](LICENSE).\n\n---\n\n¡Gracias por jugar Snake Game! Si te gustó el proyecto, no olvides darle una estrella en GitHub :star:\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeysonht%2Fsnakegamewithjava","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeysonht%2Fsnakegamewithjava","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeysonht%2Fsnakegamewithjava/lists"}