HOG2
mapalgorithms
RHRUnit.h
Go to the documentation of this file.
1
/*
2
* RHRUnit.h
3
* hog2
4
*
5
* Created by Nathan Sturtevant on 4/23/07.
6
* Copyright 2007 Nathan Sturtevant, University of Alberta. All rights reserved.
7
*
8
*/
9
10
#include "
MapUnit.h
"
11
#include "
Map2DEnvironment.h
"
12
13
#ifndef RHRUNIT_H
14
#define RHRUNIT_H
15
19
class
RHRUnit
:
public
MapUnit
{
20
public
:
21
RHRUnit
(
int
x,
int
y)
22
:
MapUnit
(x, y)
23
{
lastIndex
= 0;
initial
=
true
; }
24
const
char
*
GetName
() {
return
"RHRUnit"
; }
25
bool
MakeMove
(
MapEnvironment
*,
OccupancyInterface<xyLoc, tDirection>
*,
MapSimulationInfo
*,
tDirection
&);
26
void
UpdateLocation
(
MapEnvironment
*,
xyLoc
&,
bool
,
MapSimulationInfo
*);
27
private
:
28
int
lastIndex
;
29
bool
initial
;
30
};
31
32
#endif
RHRUnit::MakeMove
bool MakeMove(MapEnvironment *, OccupancyInterface< xyLoc, tDirection > *, MapSimulationInfo *, tDirection &)
Make the next move.
Definition:
RHRUnit.cpp:17
SimulationInfo
Definition:
SimulationInfo.h:13
RHRUnit::UpdateLocation
void UpdateLocation(MapEnvironment *, xyLoc &, bool, MapSimulationInfo *)
set rhr unit location.
Definition:
RHRUnit.cpp:30
RHRUnit
A simple unit that attempts to follow walls using the right hand rule.
Definition:
RHRUnit.h:19
xyLoc
Definition:
Map2DEnvironment.h:37
Map2DEnvironment.h
MapEnvironment
Definition:
Map2DEnvironment.h:133
tDirection
tDirection
Definition:
Map2DEnvironment.h:77
RHRUnit::initial
bool initial
Definition:
RHRUnit.h:29
RHRUnit::lastIndex
int lastIndex
Definition:
RHRUnit.h:28
MapUnit
A simple map-based unit.
Definition:
MapUnit.h:22
RHRUnit::RHRUnit
RHRUnit(int x, int y)
Definition:
RHRUnit.h:21
MapUnit.h
RHRUnit::GetName
const char * GetName()
Definition:
RHRUnit.h:24
OccupancyInterface< xyLoc, tDirection >
Generated by
1.8.17