java.lang.Object
com.github.freddyyj.randomtrainsimworld.Locomotive
public class Locomotive extends Object
A locomotive class
- Author:
- FreddyYJ_
-
Field Summary
Fields Modifier and Type Field Description boolean
isSelected
If true, this locomotive can be selected by random pick. -
Constructor Summary
Constructors Constructor Description Locomotive(int id, String name, Route route)
Deprecated.Locomotive(String name, Route route)
Constructor with loco name and running route.Locomotive(String name, Route route, boolean isSelected)
Constructor with loco name, running route and selection -
Method Summary
-
Field Details
-
isSelected
public boolean isSelectedIf true, this locomotive can be selected by random pick.
-
-
Constructor Details
-
Locomotive
Deprecated.Constructor with loco ID, loco name and running route- Parameters:
id
- locomotive IDname
- locomotive nameroute
- route that this locomotive running
-
Locomotive
Constructor with loco name, running route and selection- Parameters:
name
- locomotive nameroute
- route that this locomotive runningisSelected
- initialisSelected
value
-
Locomotive
Constructor with loco name and running route.isSelected
sets to true.- Parameters:
name
- locomotive nameroute
- route that this locomotive running
-
-
Method Details