{"id":23350391,"url":"https://github.com/lehcode/simple-slots","last_synced_at":"2025-04-07T18:19:03.861Z","repository":{"id":268568059,"uuid":"904437971","full_name":"lehcode/simple-slots","owner":"lehcode","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-17T15:46:31.000Z","size":412,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T20:16:26.381Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lehcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-12-16T22:19:47.000Z","updated_at":"2024-12-17T15:46:35.000Z","dependencies_parsed_at":"2024-12-17T15:41:56.200Z","dependency_job_id":"a70ac27e-6dd5-48af-a6c6-49d5c532b8be","html_url":"https://github.com/lehcode/simple-slots","commit_stats":null,"previous_names":["lehcode/simple-slots"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lehcode%2Fsimple-slots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lehcode%2Fsimple-slots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lehcode%2Fsimple-slots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lehcode%2Fsimple-slots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lehcode","download_url":"https://codeload.github.com/lehcode/simple-slots/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704573,"owners_count":20982298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-21T08:16:17.243Z","updated_at":"2025-04-07T18:19:03.835Z","avatar_url":"https://github.com/lehcode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slots Game\n\nA simple browser-based mini-game built with Angular where players control a character to catch falling objects. The game features configurable settings, real-time score tracking, and simulated WebSocket updates.\n\n![Implementation diagram](doc/diagram.jpg)\n\n## Features\n\n- Real-time gameplay with keyboard controls\n- Configurable game settings:\n  - Falling speed of objects\n  - Frequency of object spawning\n  - Player movement speed\n  - Game duration\n- Live score tracking\n- Pseudo-WebSocket implementation for game state updates\n- Responsive design with TailwindCSS\n\n## Prerequisites\n\n- Node.js (v18 or higher)\n- Yarn package manager\n\n## Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/lehcode/simple-slots.git\ncd slots-game\n```\n\n1. Install dependencies:\n\n```bash\nyarn install\n```\n\n## Running the Application\n\n1. Start the development server:\n\n```bash\nyarn start\n```\n\n2. Open your browser and navigate to `http://localhost:4200`\n\n## Game Instructions\n\n1. Configure game settings in the Settings page:\n   - Falling Speed (10-50): Controls how fast objects fall\n   - Falling Frequency (10-50): Controls how often new objects appear\n   - Player Speed (10-50): Controls how fast the player can move\n   - Game Time (10-50): Sets the game duration in seconds\n\n2. Start the game:\n   - Use left and right arrow keys to move the player\n   - Catch falling objects to score points\n   - Game ends when the timer runs out\n\n## Technical Implementation\n\n### Key Components\n\n- **GameStateService**: Manages the core game logic and state\n- **PseudoWebSocketService**: Simulates WebSocket connection for state updates\n- **SettingsFormComponent**: Handles game configuration using reactive forms\n- **GameComponent**: Main game UI and player controls\n\n### Technologies Used\n\n- Angular 18\n- RxJS for reactive programming\n- TailwindCSS for styling\n- TypeScript for type safety\n\n### Performance Optimizations\n\n1. OnPush change detection strategy\n2. Reactive forms for efficient form handling\n3. RxJS operators for optimized data flow\n4. Signal-based state management\n5. RequestAnimationFrame for smooth animations\n\n## Development Notes\n\n- Uses strict TypeScript compilation\n- Implements reactive programming patterns\n- Follows Angular best practices and style guide\n- Includes comprehensive type definitions\n- Uses signals for efficient state management\n\n## Building for Production\n\n```bash\nyarn build\n```\n\nThe build artifacts will be stored in the `dist/` directory.\n\n## Running Tests\n\n```bash\nyarn test\n```\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flehcode%2Fsimple-slots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flehcode%2Fsimple-slots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flehcode%2Fsimple-slots/lists"}