Frequently Asked Questions


Q. How do I get a copy of the code or the maps?
A. Type "Update" -- A mm2 directory will be created (if it does not exist) and the code will be copied. Makefile, Turn.C, and Turn.h will not overwrite existing ones.

Q. Is there any printing available?
A. Yes, there is a line printer available, which can be invoked by typing lpr -dlp1265 FILENAME. Laser printing is not allowed.

Q. Are there any sample clients I can try out?
A. Sure. In your path are Client_sleeper (sitting ducks that never move), Client_homeboy (a client that can find it's way back to the base, from the tutorial), Client_random (the random but fairly effective client from the tutorial), and Client_killers (Mike Lee's aggressive random team).
MORE Q & A

Q. Can the enemy know what your base is?

A. No. They do not.  Only you know where your home base is.


Q. What if a flag-carrying ship is destroyed?

A. The flag is dropped in the current starsystem.


Q. Is there anything special about flags at your home base?

A. Nope.  They can be picked up and dropped like anything else.


Q. What happens when you fire on a ship?

A. Damage is based on your power allocated to weapons.  
   The enemy ship has the damage subtracted from their shields 
   AND their total power.  This is permanent (total power will
   no regenerate).


Q. Will the address of a Star (or Ship or Enemy) change 
   during the game?

A. No -- once a Star, Ship, or Enemy is created and added to 
   its respective list in your World object, its address will 
   be valid for the duration of execution.  Feel free to keep 
   pointers to them.


Q. What happens if I call Configuration with parameters that
   don't allocate enough power to transport the flag I am
   presently carrying?

A. The server will consider this an illegal request, and refuse
   to honor it like any other illegal configuration call.  Thus,
   your configuration would not change as a result of this call.
   HELPFUL NOTE: Keep in mind with integer arithmetic, 
   100/3 + 100/3 + 100/3 = 33 + 33 + 33 = 99 != 100, so be carful
   with your parameters in Configuration, and make sure that they
   sum to Power().


Q. How do you scroll up in these terminal windows?

A. SHIFT-PAGE_UP will scroll up and SHIFT-PAGE_DOWN will scroll back down.


Q. Why are srand and drand not working properly?

A. You need to #include <stdlib.h>  at the top of Team.C

Q. What are the game parameters (game time, number of ships, etc.)?

A. The tourney games will have the following:


Q. How is damage computed?

A. Suppose you attack with weapon power W.  The damage done is
determined with the following: Choose x, y distributed uniformally
between 0 and 1 (from drand48()) such that x+y < 1.  The damage is
W*(x+1)/2 * DMG_SCALE, where that constant is 0.75.  The result is
your damage is between 0.37 and 0.75 of your weapon, with the average
roughly around 0.5.  The code is in Server.C.