Вторая лабораторная работа
This commit is contained in:
parent
27ffa4f629
commit
da743af9ba
@ -2,7 +2,6 @@ package DoubleDeckerBus.DrawningObjects;
|
||||
|
||||
import DoubleDeckerBus.DirectionType;
|
||||
import DoubleDeckerBus.Entities.EntityBus;
|
||||
import java.util.Scanner;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.Random;
|
||||
@ -16,8 +15,6 @@ public class DrawningBus {
|
||||
protected int _startPosY;
|
||||
protected int _busWidth = 160;
|
||||
protected int _busHeight = 100;
|
||||
|
||||
|
||||
private IDraw DrawningDoor;
|
||||
|
||||
public EntityBus EntityBus() {
|
||||
@ -28,7 +25,6 @@ public class DrawningBus {
|
||||
if (width <= _busWidth || height <= _busHeight) {
|
||||
return;
|
||||
}
|
||||
|
||||
_startPosX = 0;
|
||||
_startPosY = 0;
|
||||
busPanel.setSize(width, height);
|
||||
@ -76,7 +72,6 @@ public class DrawningBus {
|
||||
}
|
||||
DrawningDoor.ChangeDoorsNumber(random.nextInt(2, 6));
|
||||
}
|
||||
|
||||
public void SetPosition(int x, int y){
|
||||
if (x < 0 || x + _busWidth > _pictureWidth)
|
||||
{
|
||||
|
@ -22,7 +22,6 @@ public class DrawningDoor implements IDraw {
|
||||
blackColor = Color.BLACK;
|
||||
BusPanel = busPanel;
|
||||
}
|
||||
|
||||
public void ChangeX(int x){
|
||||
CurX = x;
|
||||
}
|
||||
@ -41,7 +40,6 @@ public class DrawningDoor implements IDraw {
|
||||
DoorNumberType = DoorNumberType.Five;
|
||||
}
|
||||
}
|
||||
|
||||
public DoorNumberType DoorNumberType() {
|
||||
return DoorNumberType;
|
||||
}
|
||||
|
@ -50,7 +50,6 @@ public class DrawningDoorOval implements IDraw {
|
||||
Graphics2D g2d = (Graphics2D)BusPanel.getGraphics();
|
||||
g2d.fillOval(x, y, 10, 20);
|
||||
}
|
||||
|
||||
public void DrawDoors() {
|
||||
Graphics2D g2d = (Graphics2D) BusPanel.getGraphics();
|
||||
g2d.setColor(blackColor);
|
||||
|
@ -13,7 +13,6 @@ public class DrawningDoorTriangle implements IDraw {
|
||||
private int Height;
|
||||
public int CurX;
|
||||
public int CurY;
|
||||
|
||||
public DrawningDoorTriangle(int width, int height, int curX, int curY, JPanel busPanel) {
|
||||
Width = width;
|
||||
Height = height;
|
||||
|
@ -13,7 +13,6 @@ import java.io.IOException;
|
||||
import java.util.Random;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.*;
|
||||
|
||||
public class FormDoubleDeckerBus {
|
||||
static DrawningBus DrawningBus;
|
||||
static AbstractStrategy _abstractStrategy;
|
||||
|
Loading…
Reference in New Issue
Block a user