资源描述:
《c语言写的俄罗斯方块程序(tetris written in c language program)》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、c语言写的俄罗斯方块程序(TetriswritteninClanguageprogram)TetriswritteninClanguageprogramAuthor:hoodlum1980peopleread:29366source:theoriginalreleasedate:2008-3-14vgn-p15g(294).Commentanddiscussion:http://bbs.bccn.net/thread-203143-1-1.htmlProbablyinthelasttwodays
2、tocompletetheencoding,butthepreviousdaystarted.Thefirstnightmainlycompletedtheboxrotationalgorithm,theseconddayoftoday'sconsumerboxaddedprocessingalgorithms.Buttheremaybesomeplaces,suchasinconsiderate,butdidnotusethetimerinterrupt,convenientuseandthe
3、frequencyofdelay(CPU)functiontosimulatethetimeinterval,thisistheplaceneedstobeimproved.Themainlogic:(1)duetotherandomnessofthefunctionofCisnotgood,soeverytimethegametimeissetaccordingtotheBIOSseed.(2)thehigherthescore,theboxfellfaster(every200minutes
4、).(3)everydropofaboxwith1points,eacheliminatelineplus10points,two30points,three70points,four150points.Testscoreof100points.Gamecontrol:Up-rotation;space-aboutfallingintheend;thedirectionkeycontroldirection.P-tostartorpausethegame.ESC-exit.Characteris
5、tic:(1)becausetheTCdoesnotsupportChinese,sobasicallyEnglishnotes.(2)afunctionnamedasfaraspossibletheinternalprocessingandprocesstoregulatetheexpressionof.(3)codeannotatedwithonly577lines.(IhavedownloadedtwoaTetriscodeonline1087,onein993,mylessthanthe
6、ircode).(4)inadditiontoeliminatespaceswhenthecomplexityofotheralgorithmsarerelativelysimple.(5)thedrawingefficiencyandlocalefficiencyneedstobeimprovedtothrowcode.(6)theFrameTimeparametermaybespecificallysetaccordingtodifferenthardwareenvironment,Init
7、GameTCneedstherightpath.AdreamTetrissourceinabout9yearsagoasafreshman,wearelearningClanguage,myroommateroommateinvitedmetoworktogethertocompletetheTetris(Homeworkproperties),butwaslimitedtoourleveltocomparefoodandlearningstateislazy,wedidnotfinish.Th
8、esametimeIfoundsomeoneintheroomleftTetrisprogram,runaftertheteacherfoundexcitedlyaskedmeifIwroteit,Iamashamedtoshake.ThenseeothersdoCprocedures(oneselfdeeplyenviousjustwritedozensoflinesofcode).AfterafewyearsIstillseeadifferentstyle,butIneverrealized