- set(int, int, SlotView) - Method in class org.cppftw.trains.controller.Field
-
Places slotView on the given position of the field.
- setCurrentPlace(Slot) - Method in class org.cppftw.trains.model.Vehicle
-
Sets the attribute currentPlace
to the Slot
given by the parameter
currentPlace
.
- setFixSlot(Slot) - Method in class org.cppftw.trains.model.Portal
-
Sets the fixSlot
of this Portal
to the given Slot
.
- setFixSlot(Slot) - Method in class org.cppftw.trains.model.Switch
-
Sets the fixSlot
of this Switch
to the given Slot
.
- setNeighbor(int, Slot) - Method in class org.cppftw.trains.model.Rail
-
Sets the one of the neighbors of this Rail
identified by which
to neighbor
.
- setNextCoach(Coach) - Method in class org.cppftw.trains.model.Vehicle
-
Sets the nextCoach
attribute of the Coach
given by the parameter
nextCoach
to the nextCode
attribute of this, then sets the nextCoach
attribute of this to the Coach
given by the parameter nextCoach
,
thus inserting the nextCoach
parameter into the chain of train elements
right after this Vehicle
.
- setNextCoach(Trailable) - Method in class org.cppftw.trains.model.Vehicle
-
Sets the nextCoach
attribute of this to the Coach
given by the parameter
nextCoach
.
- setOption(int, Slot) - Method in class org.cppftw.trains.model.Switch
-
Adds a new Slot
to the selectable list of options
.
- setOptionalRoute(Slot) - Method in class org.cppftw.trains.model.Portal
-
Sets the optionalRoute
of this Portal
to the given Slot
.
- setTunnelLength(int) - Method in class org.cppftw.trains.controller.Controller
-
Sets length
as the value to the attribute tunnelLength
, which
determines the length of the Tunnel
s, that is, the number of rails in Tunnel
s
to be opened.
- SimpleView<T> - Class in org.cppftw.trains.view
-
Abstract base class for all other views.
- SimpleView(T) - Constructor for class org.cppftw.trains.view.SimpleView
-
Creates a view for the given model
.
- SimpleView(Canvas, Point2D, T) - Constructor for class org.cppftw.trains.view.SimpleView
-
Creates a view for the given model
to put on the given canvas
at the given point
.
- Slot - Class in org.cppftw.trains.model
-
Represents a general element on the game field.
- Slot() - Constructor for class org.cppftw.trains.model.Slot
-
- SlotView - Class in org.cppftw.trains.view
-
The abstract SlotView
class serves as a base class
for all view classes belonging to classes derived from the
Slot
class.
- SlotView(Slot) - Constructor for class org.cppftw.trains.view.SlotView
-
Creates a Slot
based on the given parameters.
- start(Stage) - Method in class org.cppftw.trains.view.GUI
-
Overrides the start
method of the class
Application, displays the GUI.
- Station - Class in org.cppftw.trains.model
-
The class Station
represents the stations connected to Slot
s.
- Station(Color, boolean) - Constructor for class org.cppftw.trains.model.Station
-
Creates a Station
with a Color
given by the parameter color
and with waiting passengers determined by the parameter hasPassengers
.
- StationView - Class in org.cppftw.trains.view
-
View for the Station
class.
- StationView(Station) - Constructor for class org.cppftw.trains.view.StationView
-
Creates a StationView
based on the given parameters.
- step() - Method in class org.cppftw.trains.controller.Controller
-
Performs a game step.
- step(Slot, boolean) - Method in class org.cppftw.trains.model.Coach
-
Moves the Coach
to the position given by nextSlot
.
- step() - Method in class org.cppftw.trains.model.Locomotive
-
Moves this Locomotive
to the next position.
- step(Slot, boolean) - Method in class org.cppftw.trains.model.NotifierCoach
-
Implements the step
method of the Trailable
interface.
- step(Slot, boolean) - Method in interface org.cppftw.trains.model.Trailable
-
Moves this to the position given by nextSlot
.
- Switch - Class in org.cppftw.trains.model
-
The class Switch
represents a railway switch.
- Switch(int) - Constructor for class org.cppftw.trains.model.Switch
-
Creates a Switch
with all options
and its fixSlot
set
as the single instance of Ground
.
- switchTo(int) - Method in class org.cppftw.trains.model.Switch
-
Selects the Slot
that is the Nth element of options
,
where N=selectedOption
+1 to be the active optional Slot
of this Slot
.
- switchToNext() - Method in class org.cppftw.trains.model.Switch
-
- SwitchView - Class in org.cppftw.trains.view
-
View for the Switch
class.
- SwitchView(Switch, Direction) - Constructor for class org.cppftw.trains.view.SwitchView
-
Creates a SwitchView
based on the given parameters.