From fd41290d8e42205a78563a92b6539a6cfbb8428b Mon Sep 17 00:00:00 2001 From: ekallin Date: Wed, 13 Sep 2023 21:01:33 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=20=D1=81=D1=83=D1=89?= =?UTF-8?q?=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20(entity)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/misc.xml | 2 +- .../EntityElectricLocomotive.java | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 ProjectElectricLocomotive/EntityElectricLocomotive.java diff --git a/.idea/misc.xml b/.idea/misc.xml index 501ce09..4458232 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/ProjectElectricLocomotive/EntityElectricLocomotive.java b/ProjectElectricLocomotive/EntityElectricLocomotive.java new file mode 100644 index 0000000..962864f --- /dev/null +++ b/ProjectElectricLocomotive/EntityElectricLocomotive.java @@ -0,0 +1,26 @@ +package ProjectElectricLocomotive; + +import java.awt.*; + +public class EntityElectricLocomotive { + public int Speed; + public int Weight; + public Color BodyColor; + public Color AdditionalColor; + public boolean Horns; + public boolean SeifBatteries; + public double Step() + { + return (double) Speed * 100 / Weight; + } + public void Init(int speed, int weight, Color bodyColor, Color additionalColor, + boolean horns, boolean seifBatteries) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + AdditionalColor = additionalColor; + Horns = horns; + SeifBatteries = seifBatteries; + } +}