Extras Class Reference

#include <Extras.h>

Inheritance diagram for Extras:

Inheritance graph
[legend]
Collaboration diagram for Extras:

Collaboration graph
[legend]

Public Member Functions

 Extras (const Vector2D &c, const double r, const double e, const long int col)
 ~Extras ()
bool is_alive ()
virtual void die ()
double get_energy ()

Protected Attributes

double energy
bool alive
char log_file_char

Constructor & Destructor Documentation

Extras::Extras const Vector2D c,
const double  r,
const double  e,
const long int  col
 

Definition at line 35 of file Extras.cc.

References alive, and Circle::draw_shape().

00036   : Circle(c, r, col), energy(e)
00037 {
00038   alive = true;
00039 #ifndef NO_GRAPHICS
00040   if( !no_graphics )
00041     draw_shape( false );
00042 #endif
00043 }

Here is the call graph for this function:

Extras::~Extras  )  [inline]
 

Definition at line 31 of file Extras.h.

00031 {}


Member Function Documentation

void Extras::die  )  [virtual]
 

Definition at line 70 of file Extras.cc.

References alive, Gui::get_arenawindow_p(), Gui::get_bg_gdk_colour_p(), ArenaController::is_realtime(), log_file_char, realtime_arena, the_arena_controller, and the_gui.

Referenced by Robot::get_messages(), Shot::move(), and Robot::move().

00071 {
00072    alive = false;
00073 #ifndef NO_GRAPHICS
00074    if (!no_graphics )
00075      the_gui.get_arenawindow_p()->
00076        draw_circle( last_drawn_center, last_drawn_radius,
00077                     *(the_gui.get_bg_gdk_colour_p()), true );
00078 #endif
00079 
00080    if( the_arena_controller.is_realtime() )
00081      realtime_arena.print_to_logfile( 'D', (int)log_file_char, id );
00082 }

Here is the call graph for this function:

double Extras::get_energy  )  [inline]
 

Definition at line 35 of file Extras.h.

Referenced by Robot::move().

00035 { return energy; }

bool Extras::is_alive  )  [inline]
 

Definition at line 33 of file Extras.h.

00033 { return alive; }


Field Documentation

bool Extras::alive [protected]
 

Definition at line 39 of file Extras.h.

Referenced by die(), and Extras().

double Extras::energy [protected]
 

Definition at line 38 of file Extras.h.

char Extras::log_file_char [protected]
 

Definition at line 40 of file Extras.h.

Referenced by die().


The documentation for this class was generated from the following files:
Generated on Fri Oct 15 15:49:50 2004 for Real Time Battle by  doxygen 1.3.9.1