Fixed essue
This commit is contained in:
parent
2894298cd5
commit
867bed0c7c
6
ProjectMonorail/.idea/vcs.xml
generated
Normal file
6
ProjectMonorail/.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -16,6 +16,7 @@ public class DrawingModernMonorail {
|
||||
|
||||
public EntityModernMonorail getMonorail() {return _entityMonorail;}
|
||||
public DrawingWheels getWheels() {return _wheels;}
|
||||
private int _wheelsSeed;
|
||||
|
||||
public void Initialization(int speed, float weight, Color bodyColor, Color additionalColor, boolean monorailTrack, boolean cabin)
|
||||
{
|
||||
@ -24,6 +25,7 @@ public class DrawingModernMonorail {
|
||||
_wheels = new DrawingWheels();
|
||||
Random rnd = new Random();
|
||||
_wheels.SetCountWheels(2 + rnd.nextInt(0, 3));
|
||||
_wheelsSeed = rnd.nextInt(0, 2);
|
||||
}
|
||||
|
||||
public boolean SetPictureSize(int width, int height)
|
||||
@ -165,7 +167,7 @@ public class DrawingModernMonorail {
|
||||
}
|
||||
else if (coordinatesX.length == 3) {
|
||||
Random rnd = new Random();
|
||||
if (rnd.nextInt(0, 2) == 1) {
|
||||
if (_wheelsSeed == 1) {
|
||||
coordinatesX[2] = _startPositionX + 25;
|
||||
}
|
||||
else {
|
||||
@ -221,7 +223,7 @@ public class DrawingModernMonorail {
|
||||
}
|
||||
else if (coordinatesX.length == 3) {
|
||||
Random rnd = new Random();
|
||||
if (rnd.nextInt(0, 2) == 1) {
|
||||
if (_wheelsSeed == 1) {
|
||||
coordinatesX[2] = _startPositionX - 35 + offset;
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user