1 / 3

TETRIS!

TETRIS!. Jeff Dam. Inspiration/Methods. Inspiration: pacman.m Methods: For the shapes they were created just with an array Shapes are chosen at random with a rand() function 4 different shapes with equal probability Movement is created using random walks

sakura
Télécharger la présentation

TETRIS!

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TETRIS! Jeff Dam

  2. Inspiration/Methods • Inspiration: pacman.m • Methods: • For the shapes they were created just with an array • Shapes are chosen at random with a rand() function • 4 different shapes with equal probability • Movement is created using random walks • If left or right is chosen it also moves down to save time and to prevent it getting stuck. • Boundaries • Like the DLA, it checks it checks the left/right side & diagonal to see if there is a colored in box. If there is it moves straight down. • If there is something below it, it will stop and another shape is generated. • Game ends when ((maxX/2)-1: (maxX/2)+1 , maxY-4) is occupied • Color • Used colormap with JET

  3. Run code with “Tetris” • .10 probability of moving left or right. 0.01 probability of moving left or right.

More Related