O'Reilly logo

Head First C#, 2nd Edition by Jennifer Greene, Andrew Stellman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required