Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sander Kvenild
DCST1007 - OOP
Commits
e510cbf6
Commit
e510cbf6
authored
Feb 11, 2022
by
Sander Kvenild
Browse files
Fixed objects floating towards top left
parent
054b5615
Changes
1
Hide whitespace changes
Inline
Side-by-side
js-ov13-oop3-sander-kvenild/minebobler.html
View file @
e510cbf6
...
...
@@ -23,8 +23,8 @@
this
.
orginalFarge
=
this
.
farge
;
}
flytt
()
{
this
.
x
=
this
.
x
+
Math
.
floor
(
Math
.
random
()
*
10
-
5
);
this
.
y
=
this
.
y
+
Math
.
floor
(
Math
.
random
()
*
10
-
5
);
this
.
x
=
this
.
x
+
Math
.
round
(
Math
.
random
()
*
10
-
5
);
this
.
y
=
this
.
y
+
Math
.
round
(
Math
.
random
()
*
10
-
5
);
}
// Keep bubbles from going outside of canvas
...
...
@@ -65,8 +65,8 @@
this
.
orginalFarge
=
this
.
farge
;
}
flytt
()
{
this
.
x
=
this
.
x
+
Math
.
floor
(
Math
.
random
()
*
10
-
5
);
this
.
y
=
this
.
y
+
Math
.
floor
(
Math
.
random
()
*
10
-
5
);
this
.
x
=
this
.
x
+
Math
.
round
(
Math
.
random
()
*
10
-
5
);
this
.
y
=
this
.
y
+
Math
.
round
(
Math
.
random
()
*
10
-
5
);
}
// Keep bubbles from going outside of canvas
...
...
Write
Preview
Supports
Markdown
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