Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
killer_sokoban
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
Schulcz Ferenc
killer_sokoban
Commits
7faac365
Commit
7faac365
authored
7 years ago
by
tildiko97
Browse files
Options
Downloads
Patches
Plain Diff
SimpleField: fluid + printStat
parent
842517d7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/killer_sokoban/SimpleField.java
+15
-1
15 additions, 1 deletion
src/killer_sokoban/SimpleField.java
with
15 additions
and
1 deletion
src/killer_sokoban/SimpleField.java
+
15
−
1
View file @
7faac365
...
@@ -113,18 +113,32 @@ public class SimpleField extends AbstractField {
...
@@ -113,18 +113,32 @@ public class SimpleField extends AbstractField {
public
double
getFriction
()
{
public
double
getFriction
()
{
return
friction
;
return
friction
;
}
}
@Override
public
String
toString
()
{
return
"no fluid"
;
}
}
}
protected
class
Oil
extends
Fluid
{
protected
class
Oil
extends
Fluid
{
Oil
()
{
Oil
()
{
friction
=
0
;
friction
=
0
;
}
}
@Override
public
String
toString
()
{
return
"Oil"
;
}
}
}
protected
class
Honey
extends
Fluid
{
protected
class
Honey
extends
Fluid
{
Honey
()
{
Honey
()
{
friction
=
2
;
friction
=
2
;
}
}
@Override
public
String
toString
()
{
return
"Honey"
;
}
}
}
public
void
putOil
()
{
public
void
putOil
()
{
...
@@ -139,7 +153,7 @@ public class SimpleField extends AbstractField {
...
@@ -139,7 +153,7 @@ public class SimpleField extends AbstractField {
{
{
super
.
printStat
();
super
.
printStat
();
System
.
out
.
println
(
"moveable: "
+
Main
.
getMoveableName
(
myMoveable
));
System
.
out
.
println
(
"moveable: "
+
Main
.
getMoveableName
(
myMoveable
));
System
.
out
.
println
(
"fluid: "
+
fluid
);
System
.
out
.
println
(
"fluid: "
+
fluid
.
toString
()
);
}
}
...
...
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
register
or
sign in
to comment