This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
notes:cprog:spring2025:projects:mtb2 [2025/02/25 03:55] – [computer operated player] tstrickl | notes:cprog:spring2025:projects:mtb2 [2025/02/25 22:07] (current) – [score display] bdildine | ||
---|---|---|---|
Line 24: | Line 24: | ||
====score display==== | ====score display==== | ||
Within the video.h header file, there is a series of print functions, which prints characters to the screen based on the string that is provided to it. | Within the video.h header file, there is a series of print functions, which prints characters to the screen based on the string that is provided to it. | ||
+ | You can use the itoa(); function included in the string.h header file to convert your score from and integer to a string if that's the method you are using. | ||
====computer operated player==== | ====computer operated player==== | ||
To allow for the paddle to track the ball, it would be recommended to find a linear equation to represent the balls path, that which changes everytime it bounces of the roof, floor, or paddle. After finding the y-intercept, | To allow for the paddle to track the ball, it would be recommended to find a linear equation to represent the balls path, that which changes everytime it bounces of the roof, floor, or paddle. After finding the y-intercept, |