Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
lab10
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Анамария Морено
lab10
Commits
f7ac1de3
Commit
f7ac1de3
authored
Nov 26, 2023
by
Муратханов Тимурхан
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Поменял условия методов классов для корректной работы
related #5
parent
d1c6a3fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
TruckState.ts
src/TruckState/TruckState.ts
+1
-1
InBaseState.ts
src/TruckState/state/InBaseState.ts
+1
-1
No files found.
src/TruckState/TruckState.ts
View file @
f7ac1de3
...
@@ -10,7 +10,7 @@ export abstract class TruckState {
...
@@ -10,7 +10,7 @@ export abstract class TruckState {
public
abstract
name
:
string
;
public
abstract
name
:
string
;
public
abstract
changeDriver
(
driver
:
Driver
):
void
;
public
abstract
changeDriver
():
void
;
public
abstract
startRun
():
void
;
public
abstract
startRun
():
void
;
...
...
src/TruckState/state/InBaseState.ts
View file @
f7ac1de3
...
@@ -16,7 +16,7 @@ function getRandomDriver (): Driver {
...
@@ -16,7 +16,7 @@ function getRandomDriver (): Driver {
export
class
InBaseState
extends
TruckState
{
export
class
InBaseState
extends
TruckState
{
public
name
:
string
=
'На базе'
;
public
name
:
string
=
'На базе'
;
public
changeDriver
(
driver
:
Driver
):
void
{
public
changeDriver
():
void
{
this
.
truck
.
driver
=
getRandomDriver
();
this
.
truck
.
driver
=
getRandomDriver
();
console
.
log
(
'Водитель поменян успешно'
);
console
.
log
(
'Водитель поменян успешно'
);
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment