{"id":44403074,"url":"https://github.com/chrum/ngx-tetris","last_synced_at":"2026-02-12T06:30:11.731Z","repository":{"id":32958702,"uuid":"147800578","full_name":"chrum/ngx-tetris","owner":"chrum","description":"angular tetris component","archived":false,"fork":false,"pushed_at":"2023-03-04T02:49:38.000Z","size":1052,"stargazers_count":18,"open_issues_count":3,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-12-26T16:16:03.195Z","etag":null,"topics":["angular","education","tetris"],"latest_commit_sha":null,"homepage":"http://chrum.it/pages/ngx-tetris","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/chrum.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}},"created_at":"2018-09-07T09:15:44.000Z","updated_at":"2023-12-10T08:45:02.000Z","dependencies_parsed_at":"2023-02-16T00:00:47.741Z","dependency_job_id":null,"html_url":"https://github.com/chrum/ngx-tetris","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/chrum/ngx-tetris","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrum%2Fngx-tetris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrum%2Fngx-tetris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrum%2Fngx-tetris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrum%2Fngx-tetris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrum","download_url":"https://codeload.github.com/chrum/ngx-tetris/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrum%2Fngx-tetris/sbom","scorecard":{"id":281694,"data":{"date":"2025-08-11","repo":{"name":"github.com/chrum/ngx-tetris","commit":"5a886d16d2f14f36a26c3c36715d13c0bcccea2a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"66 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-273r-mgr4-v34f","Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w","Warn: Project is vulnerable to: GHSA-q9mw-68c2-j6m5","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-7x7c-qm48-pq9c","Warn: Project is vulnerable to: GHSA-rc3x-jf5g-xvc5","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-82v2-mx6x-wq7q","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj","Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq","Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-fhg7-m89q-25r3","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T16:01:48.769Z","repository_id":32958702,"created_at":"2025-08-17T16:01:48.769Z","updated_at":"2025-08-17T16:01:48.769Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29360644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"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":["angular","education","tetris"],"created_at":"2026-02-12T06:30:11.233Z","updated_at":"2026-02-12T06:30:11.716Z","avatar_url":"https://github.com/chrum.png","language":"TypeScript","readme":"# ngx-tetris\n\nTetris game as an angular component\n\n***ngx-tetris*** is actually only the ***core of the game***... YOU need to add everything around it (controls, score...)  yourself :)\n\n\nCheck the demo [here](http://chrum.it/pages/ngx-tetris)\n\n## Using it:\n#### Install:\n```bash\nnpm install ngx-tetris\n```\n\n#### Import\n```javascript\nimport {BrowserModule} from '@angular/platform-browser';\nimport {NgModule} from '@angular/core';\n\nimport {AppComponent} from './app.component';\nimport {TetrisCoreModule} from 'ngx-tetris';\n\n@NgModule({\n    declarations: [\n        AppComponent,\n    ],\n    imports: [\n        BrowserModule,\n        TetrisCoreModule\n    ],\n    providers: [],\n    bootstrap: [AppComponent]\n})\nexport class AppModule {\n}\n```\n\n#### Add/Connect to your fancy control interface\n```html\n    \u003ctetris-core #game\n        (lineCleared)=\"onLineCleared()\"\u003e\u003c/tetris-core\u003e\n\n        \u003cbutton (click)=\"game.actionStart()\"\u003eStart\u003c/button\u003e\n        \u003cbutton (click)=\"game.actionStop()\"\u003eStop\u003c/button\u003e\n        \u003cbutton (click)=\"game.actionReset()\"\u003eReset\u003c/button\u003e\n        \u003cbutton (click)=\"game.actionRotate()\"\u003eRotate\u003c/button\u003e\n        \u003cbutton (click)=\"game.actionLeft()\"\u003eLeft\u003c/button\u003e\n        \u003cbutton (click)=\"game.actionRight()\"\u003eRight\u003c/button\u003e\n        \u003cbutton (click)=\"game.actionDown()\"\u003eDown\u003c/button\u003e\n        \u003cbutton (click)=\"game.actionDrop()\"\u003eDrop\u003c/button\u003e\n```\n\n#### Inputs\n\nName  | Default | Type | Description\n--- | --- | --- | ---\ntileSize | 25px | css unit | Size to use when rendering single tile. Can be in 'px' or in 'em' or any(probably) other css unit\ninitialSpeed | 500 | integer | Miliseconds (ms) time between falling cycles (lower number -\u003e faster game)\nstart | | boolean | Flag that toggled from false to true starts the game\nstop | | boolean | Flag that toggled from false to true stops the game\nreset | | boolean | Flag that toggled from false to true resets the game\nmoveLeft | | boolean | Flag that toggled from false to true moves current piece to the left\nmoveRight | | boolean | Flag that toggled from false to true moves current piece to the right\nmoveDown | | boolean | Flag that toggled from false to true moves piece down (falls faster)\ndrop | | boolean | Flag that toggled from false to true moves piece down (instantly drops)\nrotate | | boolean | Flag that toggled from false to true rotates current piece\n\n#### Outputs\n\nName  | Description\n--- | ---\nlineCleared | Called whenever a line was completely filled and got cleared\ngameOver | :( player was flooded with pieces and didn't make it (remember about reset button)\n\n#### Public methods\n- `actionStart`\n- `actionStop`\n- `actionReset`\n- `actionLeft`\n- `actionDown`\n- `actionRight`\n- `actionRotate`\n- `actionDrop`\n\nwhich can be used like:\n```html\n\u003cbutton (click)=\"onRotateButtonPressed()\"\u003eRotate\u003c/button\u003e\n```\n```typescript\n...\nexport class TetrisContainingComponent {\n    @ViewChild(TetrisCoreComponent)\n    private _tetris: TetrisCoreComponent;\n\n    public onRotateButtonPressed() {\n        this._tetris.actionRotate();\n    }\n}\n```\nOR\n```html\n\u003ctetris-core #game\u003e\n    \u003c/tetris-core\u003e\n\u003cbutton (click)=\"game.actionRotate()\"\u003eRotate\u003c/button\u003e\n```\n\n### Styling\n\nTo change colors and tiles (to **black and white** for example) define styles with colors like\n```scss\ntetris-core {\n    tile {\n        background: white;\n        \u0026.color-box {\n          background: #000000;\n        }\n    }\n}\n```\nfor full example (and all class names) [go here](https://github.com/chrum/ngx-tetris/blob/master/projects/ngx-tetris-app/src/styles.scss)\n\n## Development\n\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Authors\n\n[Chrystian Ruminowicz](http://chrum.it)\n\n## Licence\n\nThis project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrum%2Fngx-tetris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrum%2Fngx-tetris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrum%2Fngx-tetris/lists"}