form a tting guidelines. https://google.github.io/styleguide/javaguide.html • Use indent a tion, whitesp a ce, a nd comments e ff ectively to enh a nce re a d a bility. 4
function should h a ve one, a nd only one, job. • Keep functions focused on a single t a sk. • Bre a k down your code into sm a ller, reus a ble modules or functions. • Ensure e a ch module or function h a s a cle a r, well-de f ined purpose. • 6
w a nt to control my p a ddle using keybo a rd input, so I c a n move it up a nd down during g a mepl a y. • As a pl a yer, I w a nt to see the opponent’s p a ddle position upd a ted in re a l time, so I c a n a nticip a te their a ctions. • As a pl a yer, I w a nt to be noti f ied if my opponent disconnects, so I know when the g a me is interrupted or over. • As a pl a yer, I w a nt to see the score on screen, so I c a n keep tr a ck of the score. 12
Summer 2024 Copyright. These slides can only be used as study material for the class CSC307 at Cal Poly. They cannot be distributed or used for another purpose.