Tetris Blocks By Arthur Nugent CIS 587 Dr Maxim Story Seven different shapes each represented by a different color drop from the top of the box Each time a row is completely filled in the player wins points The player also gets points for each block that is played The object of the game is to completely fill in lines on the board before the blocks reach the top if the blocks reach the top then the game is over See picture above The game is a java applet and is located at www cppdatastructures com blocks htm The web page has 3 different and distinct java applets on it one for expert players one for average played and one for kids or beginners The kid s applet has larger blocks and they drop at much slower pace The playing field also has a couple more rows and columns to make the game last longer for the kids The expert field is also a little deeper and a little narrower meaning there is allot less room to maneuver the blocks As a players level increases so does the rate that the blocks fall In the kids game the level increase after 10 lines 5 for the average player and every 3 lines for the expert player The challenge is to beat your session s high score luring the player to stay and play The tools Arthur Nugent I made it man Doug Code I made it better man Java development kit 1 3 WinEdit Java by Example Clayton Walnum Java how to program 2nd edition Java how to program 3rd edition Scoring on a lines killed basis Expert 1 line 25 points 2 lines 100 points 3 lines 250 points 4 lines 1000 points Average and kids 1 line 10 points 2 lines 25 points 3 lines 50 points 4 lines 100 points The thought behind the expert players getting more points is to challenge the players and to hook them to the game Better bragging rights I also made the kids blocks bigger to make it easier to manipulate the blocks The challenge Experts 300 milliseconds level 1 50 milliseconds level 9 3 lines killed per level so if a hot shot player goes for the big points 4 kills at once they could conceivably jump 2 levels at once and increase the speed the block falls dramatically Average 900 milliseconds level 1 100 milliseconds level 9 5 kills per level kids 900 milliseconds level 1 100 milliseconds level 9 10 kills per level A little slower procession from level to level builds up a users confidence so that I might tare it down a little later in the game he he The players Th e bi g L Bl ockh ea d Sti ck Con fu sed l Gr een Ma n Yi n g z i g Ya n g za g Class structures Tetris blocks Shape Element Shape Creates the shape of the block Element Creates the movement of the blocks CanvasField creates the playing field Stats score speed stats Blocks runs the applet References Doug Code Helped make the applet more efficient http www tetris com Stats CanvasField
View Full Document
Unlocking...