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

来源:互联网 发布:如何提高表达能力知乎 编辑:程序博客网 时间:2024/05/10 03:13

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


0 0
原创粉丝点击