Microscopic Traffic Simulator
Main Page
Packages
Classes
Files
File List
BackwardCarCellWalker.cs
Go to the documentation of this file.
1
using
System
.Collections.Generic;
2
3
namespace
Microscopic_Traffic_Simulator___Model
.CellularTopologyObjects.CellWalkers
4
{
8
class
BackwardCarCellWalker
:
BackwardCellWalker
9
{
13
private
Car
car;
14
20
internal
BackwardCarCellWalker
(
Cell
cell,
Car
car)
21
: base(cell)
22
{
23
this.car = car;
24
}
25
30
internal
override
IEnumerable<Cell> GetNext()
31
{
32
foreach
(
Cell
cell
in
base.GetNext())
33
{
34
if
(cell.Car == car)
35
{
36
yield
return
cell;
37
}
38
else
39
{
40
yield
break
;
41
}
42
}
43
}
44
}
45
}
System
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.Cell
Class representing cell.
Definition:
Cell.cs:9
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellWalkers.BackwardCarCellWalker
Class representing backward walker through cells taken by car.
Definition:
BackwardCarCellWalker.cs:8
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.CellWalkers.BackwardCellWalker
Cell walker in backward direction.
Definition:
BackwardCellWalker.cs:8
Microscopic_Traffic_Simulator___Model.CellularTopologyObjects.Car
Class representing car
Definition:
Car.cs:11
Microscopic_Traffic_Simulator___Model
Microscopic Traffic Simulator - Model
CellularTopologyObjects
CellWalkers
BackwardCarCellWalker.cs
Generated by
1.8.11