Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

rt::Simulation Class Reference

Implements one simulation. More...

#include <robbase.h>

List of all members.

Public Methods

 Simulation (const Globals &glob, const ErrorHandler *)
 ~Simulation ()
Program * run ()
 returns the winner, or 0 if a tie occured.

rint getAllNumBots ()
 returns sum of the bot counts for all programs.

void addProgram (Program *program)
 adds a program to the current sim; only before starting it.

int getNumPrograms ()
 Returns number of programs in this simulation.

Program * getProgram (int index)
 Returns a given program.

void addSupervisor (SimSupervisor *supervis)
 adds a supervisor.

void addExecSupervisor (ExecSupervisor *es)
 adds another.

void getPosBefore (rint &x, rint &y, rint dir)
 Moves the given coordinates by one field to the given direction.


Public Attributes

const ErrorHandler * errHandler
const Globals & glob
 global constants (timings etc.).

rint vars [simVarLength]
 global vars (PUB, $FIELDS, etc.).

rint fieldWidth
rint fieldHeight
lrt::Array< Bot * > field
 for position-based access.

lrt::List< Bot * > bots
 for exec() and all walkthrough access.

unsigned long curCycle
 current game time.


Friends

class Task


Detailed Description

Implements one simulation.

Use run() to run the simulation.


The documentation for this class was generated from the following files:
This is the RoboTour API documentation version 0.1 • Copyright (C) by Florian Fischer