斯坦福大学公开课 编程方法学 Breakout 解题思路

1、The Breakout game

After all the bricks in a particularcolumn have been cleared, a path will open to the top wall. When this situationoccurs, the ball will often bounce back and forth several times between the topwall and the upper line of bricks without the user ever having to worry abouthitting the ball with the paddle. This condition is called “breaking out” andgives meaning to the name of the game. The diagram on the right shows thesituation shortly after the first ball has broken through the wall. That ballwill go on to clear several more bricks before it comes back down an openchannel. 

  


2、Flow



3、bounce off the walls 



4、Checking for collisions  

Remove bricks when coordinates coincide.


5、Audio


发布了34 篇原创文章 · 获赞 12 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/hfrommane/article/details/51338050