Printable Version of Topic

Click here to view this topic in its original format

RCBot Forums _ Source Code _ An idea

Posted by: Whistler Feb 28 2004, 01:53 AM

Using classes for each MOD may be nice smile.gif

i.e., don't use this:

CODE

if (mod_id == VALVE_DLL)
{
 ...something
}
else if (mod_id == NS_DLL)
{
... something
}

use this instead:
class CBaseBot
{
public:
virtual DoOperations();
}

class CBotValve : CBaseBot
{
...
}

class CBotNS : CBaseBot
{
...
}

CBotValue::DoOperations()
{
...something
}

CBotNS::DoOperations()
{
..some other things
}
[/code]

Posted by: Cheeseh Feb 28 2004, 11:37 AM

yes I know but its too late now blink.gif