Part III. C# Lab: Invaders

Name:

_______________

Date:

_______________

This lab gives you a spec that describes a program for you to build, using the knowledge you’ve gained throughout this book.

This project is bigger than the ones you’ve seen so far. So read the whole thing before you get started, and give yourself a little time. And don’t worry if you get stuck—there’s nothing new in here, so you can move on in the book and come back to the lab later.

We’ve filled in a few design details for you, and we’ve made sure you’ve got all the pieces you need...and nothing else.

It’s up to you to finish the job. You can download an executable for this lab from the website...but we won’t give you the code for the answer.

The grandfather of video games

In this lab you’ll pay homage to one of the most popular, revered, and replicated icons in video game history, a game that needs no further introduction. It’s time to build Invaders.

image with no caption

Your mission: defend the planet against wave after wave of invaders

The invaders attack in waves, and each wave is a tight formation of 30 individual invaders. As the player destroys invaders, his score goes up. The bottom invaders are shaped like stars and worth 10 points. The spaceships are worth 20, the saucers are worth 30, the bugs are worth 40, and the satellites are worth 50. The player starts with three lives. If he loses all three lives or the invaders reach the ...

Get Head First C#, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.