Giter Site home page Giter Site logo

trungvose / angular-tetris Goto Github PK

View Code? Open in Web Editor NEW
520.0 22.0 97.0 7.2 MB

Tetris game built with Angular and Akita ๐ŸŽฎ

Home Page: https://tetris.trungk18.com

License: MIT License

JavaScript 8.81% TypeScript 64.53% HTML 17.30% SCSS 9.37%
angular typescript akita

angular-tetris's People

Contributors

fagustin07 avatar manikandan-uthaman avatar mobi1025 avatar nartc avatar pavlikpolivka avatar trungvose avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-tetris's Issues

After playing a while, when i lose. the game restarts in the middle of another game. With lots of squares filled.

Describe the bug
After playing a while, when i lose. the game restarts in the middle of another game. With lots of squares filled.
As reported in https://twitter.com/thugGauss/status/1286539433391661056?s=20

To Reproduce
Steps to reproduce the behavior:
In progress. The root caused might be of the invalidated state after game over for the first time. I would have to init a new state.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Probably on the web

Sounds is not working - Reported by @wannabe_tecky

Describe the bug

Constantly Alert 'Sorry lah, cannot play sound'.

To Reproduce

Expected behavior
A clear and concise description of what you expected to happen.

Desktop (please complete the following information):
Chrome 83

Additional context
Refer to sound-manager.service.ts

The problem seems to happen at the process of decodeAudioData

https://stackoverflow.com/questions/10365335/decodeaudiodata-returning-a-null-error
https://stackoverflow.com/questions/42739112/decodeaudiodata-unable-to-decode-audio-data

image

Doesn't really work on mobile, browser was confused between click event and the zoom in of the mobile gesture

Describe the bug
Doesn't really work on mobile, it was confused between click event and the zoom in of the mobile gesture

To Reproduce
Steps to reproduce the behavior:
Just play the game on an iPhone and do multiple taps on the screen.

Expected behavior
Should functional well on mobile

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot

Desktop (please complete the following information):
Desktop version work pretty well

Smartphone (please complete the following information):

  • Device: iPhone X
  • Browser: Safari and Chrome

cant open

heyyy sry to say this but im nub and i cant find the html or wich file to play and i had go thru these all file however i cant run it still

i have downloaded the source code but it is not running and showing white screen... so, can you tell me how to fix it??

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

When sound muted, should stay muted even after reseting the game

Describe the bug
The sound mute status resets to its initial state (unmuted) with the game reset.

To Reproduce
Start a new game, mute the sound, then reset the game (or lose it) and start a new game, the sound is not muted anymore.

Expected behavior
When sound is muted, if you lose or reset the game and start again, the sound should still be muted.

Desktop:

  • OS: macOS Catalina 10.15
  • Browser: Chrome
  • Version: 84

Suggested solution
The value for the mute status might be stored in LocalStorageServicesame way it's done for maxPoint

Note
Not sure if that's actually a bug as it might behave this way intentionally, but from users'/players' perspective it would be better to not reset the mute status.

Thanks for this awesome game :)

cant run

hey , i cant run these , like maybe an html or application choose to run, or i have all src code ed but when i run it on google it doesnt show up only can refer to code thing

Encapsulate Query Objects access

Is your feature request related to a problem? Please describe.
Reading the project code, I saw that in the AngularTetris component the Query objects are accessed through the Services objects, but at the same time the Query objects are instantiated and used in the AngularTetris component. So I think these accesses have to be modified for the AngularTetris component only uses Service objects and encapsulate the accesses to Query objects.

Describe the solution you'd like
Move the accesses made to Query objects from the AngularTetris component to messages in the corresponding Service objects.
I will work on this change.

Additional context
I will change this:

...
export class AngularTetrisComponent implements OnInit {
  drop$: Observable<boolean>;
  isShowLogo$: Observable<boolean>;
  filling: number;

  constructor(
    private _tetrisService: TetrisService,
    private _tetrisQuery: TetrisQuery,
    private _keyboardService: KeyboardService,
    private _keyboardQuery: KeyboardQuery,
    private _soundManager: SoundManagerService,
    private _el: ElementRef,
    private _render: Renderer2
  ) {}
...

To this (implementing the refactor):

...
export class AngularTetrisComponent implements OnInit {
  drop$: Observable<boolean>;
  isShowLogo$: Observable<boolean>;
  filling: number;

  constructor(
    private _tetrisService: TetrisService,
    private _keyboardService: KeyboardService,
    private _soundManager: SoundManagerService,
    private _el: ElementRef,
    private _render: Renderer2
  ) {}
...

New Feature: Hold piece

Describe the feature
I like play tetris and this project, and I feel that the feature hold_piece would be a good contribution to this project for people who play tetris and often use this functionality. Like in this tetris game .

Describe the solution you'd like
I will do some deep research on the project code and work to incorporate this functionality, visually and functionally.

Additional context
I know many people who like to play tetris with this functionality (I include myself).
The result who I expected would be something like this, adapted to this project(visually):

  • One place to user know the holded piece:
    hold_piece_1

  • User can hold a piece:
    hold_piece_2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.