00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "book2/book2-jump-drive.hpp"
00026 #include "traveller-constants.hpp"
00027
00028 static driveRecord jumpDriveTable[24]={
00029 {'A',10,MCR 10},
00030 {'B',15,MCR 20},
00031 {'C',20,MCR 30},
00032 {'D',25,MCR 40},
00033 {'E',30,MCR 50},
00034 {'F',35,MCR 60},
00035 {'G',40,MCR 70},
00036 {'H',45,MCR 80},
00037 {'J',50,MCR 90},
00038 {'K',55,MCR 100},
00039 {'L',60,MCR 110},
00040 {'M',65,MCR 120},
00041 {'N',70,MCR 130},
00042 {'P',75,MCR 140},
00043 {'Q',80,MCR 150},
00044 {'R',85,MCR 160},
00045 {'S',90,MCR 170},
00046 {'T',95,MCR 180},
00047 {'U',100,MCR 190},
00048 {'V',105,MCR 200},
00049 {'W',110,MCR 210},
00050 {'X',115,MCR 220},
00051 {'Y',120,MCR 230},
00052 {'Z',125,MCR 240},
00053 };
00054
00055 book2JumpDrive::book2JumpDrive() : book2DriveObject (){
00056 }
00057
00058 book2JumpDrive::book2JumpDrive(char m) : book2DriveObject (){
00059
00060 this->setModel(m);
00061 }
00062
00063 void book2JumpDrive::setModel(char m){
00064 this->book2DriveObject::setModel (m);
00065 int ix;
00066 int set=0;
00067
00068 for(ix=0;ix<24;ix++){
00069 if ( jumpDriveTable[ix].model == m ){
00070 this->setCost(jumpDriveTable[ix].cost);
00071 this->setMass(jumpDriveTable[ix].mass);
00072 set = 1;
00073 }
00074 }
00075
00076 if ( set == 0 )
00077 this->book2DriveObject::setModel('?');
00078
00079
00080 }