## Beginning Programming 4 - Section Four

### by Brad Moore

Newsletter Home | Beginning Programming 4 Home | Section One | Section Two | Section Three | Section Four | Glossary

### And Now, The Challenge

Stargate

Using a two dimensional array as we have discussed and demonstrated, populate the array with periods. This will be our star map for the game we will develop next time. It is called Stargate. Each period will represent a star map coordinate. Your ship will be represented by an at sign "@". The stargate will be three asterisk in the lower right of our starmap. After populating the starmap with period, place the items described and then print the starmap to the screen with a set of horizontal and vertical coordinate makers as shown below. We will develop this further next time.

      01 02 03 04 05 06 07 08 09 10 11 12
    1  @  .  .  .  .  .  .  .  .  .  .  .
    2  .  .  .  .  .  .  .  .  .  .  .  .
    3  .  .  .  .  .  .  .  .  .  .  .  .
    4  .  .  .  .  .  .  .  .  .  .  .  .
    5  .  .  .  .  .  .  .  .  .  .  .  .
    6  .  .  .  .  .  .  .  .  .  .  .  .
    7  .  .  .  .  .  .  .  .  .  .  *  *
    8  .  .  .  .  .  .  .  .  .  .  *

As Jean-Luc Picard, Captain of the starship Enterprise would say: "Make it so." Have fun and see you next time.

Newsletter Home | Beginning Programming 4 Home | Section One | Section Two | Section Three | Section Four | Glossary