Difference between revisions of "Minitvs development"

From TVS Wiki
Jump to navigationJump to search
 
Line 6: Line 6:
 
Class Ship  
 
Class Ship  
 
{
 
{
;public:
+
; public:
;enum type('engineer','fighter','cloaker','bomber');
+
; enum type('engineer','fighter','cloaker','bomber');
;string shipname;
+
; string shipname;
;int level;
+
; int level;
;int health;
+
; int health;
;int pilot;
+
; int pilot;
;int combat;
+
; int combat;
;int score;
+
; int score;
  
;private:
+
; private:
;Ship()
+
; Ship()
;{
+
; {
:;this.type=2;
+
:; this.type=2;
:;this.health=2000;
+
:; this.health=2000;
:;this.pilot=this.combat=10;
+
:; this.pilot=this.combat=10;
:;this.score=0;
+
:; this.score=0;
:;this.shipname="Un-named";
+
:; this.shipname="Un-named";
:;this.level=1;
+
:; this.level=1;
;}
+
; }
;Ship(string name, int t)
+
; Ship(string name, int t)
;{
+
; {
:;this.type=t;
+
:; this.type=t;
:;this.health=2000;
+
:; this.health=2000;
:;this.pilot=this.combat=10;
+
:; this.pilot=this.combat=10;
:;this.score=0;
+
:; this.score=0;
:;this.shipname=name";
+
:; this.shipname=name";
:;this.level=1;
+
:; this.level=1;
;}
+
; }
 
}
 
}
  
 
      
 
      
 
[['''Definitions''']]
 
[['''Definitions''']]

Latest revision as of 05:41, 24 July 2007


'''Classes'''


Class Ship {

public
enum type('engineer','fighter','cloaker','bomber');
string shipname;
int level;
int health;
int pilot;
int combat;
int score;
private
Ship()
{
this.type=2;
this.health=2000;
this.pilot=this.combat=10;
this.score=0;
this.shipname="Un-named";
this.level=1;
}
Ship(string name, int t)
{
this.type=t;
this.health=2000;
this.pilot=this.combat=10;
this.score=0;
this.shipname=name";
this.level=1;
}

}


'''Definitions'''