Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
RoomView
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOISIL Paul
RoomView
Commits
d34126ef
Commit
d34126ef
authored
Oct 16, 2022
by
FurWaz
Browse files
Options
Downloads
Patches
Plain Diff
Added stairs direction
parent
73920dbb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Sources/app/src/main/java/Structures/PathStairs.java
+10
-0
10 additions, 0 deletions
Sources/app/src/main/java/Structures/PathStairs.java
with
10 additions
and
0 deletions
Sources/app/src/main/java/Structures/PathStairs.java
+
10
−
0
View file @
d34126ef
...
@@ -8,6 +8,7 @@ enum StairsDirection {
...
@@ -8,6 +8,7 @@ enum StairsDirection {
public
class
PathStairs
extends
PathInfo
{
public
class
PathStairs
extends
PathInfo
{
RoomInfo
roomDown
;
RoomInfo
roomDown
;
StairsDirection
direction
=
StairsDirection
.
BOTH
;
public
PathStairs
()
{
public
PathStairs
()
{
super
(
PathType
.
STAIRS
);
super
(
PathType
.
STAIRS
);
...
@@ -16,6 +17,7 @@ public class PathStairs extends PathInfo {
...
@@ -16,6 +17,7 @@ public class PathStairs extends PathInfo {
public
PathStairs
(
RoomInfo
roomUp
,
RoomInfo
roomDown
,
StairsDirection
direction
)
{
public
PathStairs
(
RoomInfo
roomUp
,
RoomInfo
roomDown
,
StairsDirection
direction
)
{
super
(
roomUp
,
PathType
.
STAIRS
);
super
(
roomUp
,
PathType
.
STAIRS
);
this
.
roomDown
=
roomDown
;
this
.
roomDown
=
roomDown
;
this
.
direction
=
direction
;
}
}
public
RoomInfo
getDestination
(
StairsDirection
direction
)
{
public
RoomInfo
getDestination
(
StairsDirection
direction
)
{
...
@@ -23,4 +25,12 @@ public class PathStairs extends PathInfo {
...
@@ -23,4 +25,12 @@ public class PathStairs extends PathInfo {
if
(
direction
==
StairsDirection
.
UP
)
return
this
.
destination
;
if
(
direction
==
StairsDirection
.
UP
)
return
this
.
destination
;
return
this
.
roomDown
;
return
this
.
roomDown
;
}
}
public
StairsDirection
getDirection
()
{
return
direction
;
}
public
void
setDirection
(
StairsDirection
direction
)
{
this
.
direction
=
direction
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment