Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Turtle Graphics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAST
Teaching
SE1
Turtle Graphics
Commits
8b2e3f0c
Commit
8b2e3f0c
authored
3 years ago
by
Huber-Saffer, Lasse
Browse files
Options
Downloads
Patches
Plain Diff
Fixed undefined ordering of the Turtle color array to conform to docs of setzeFarbe(int)
parent
ec82c465
No related branches found
No related tags found
2 merge requests
!3
Remove redundant colors and method to get colors
,
!1
Fixed undefined ordering of the Turtle color array to conform to docs of setzeFarbe(int)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Turtle.java
+6
-6
6 additions, 6 deletions
Turtle.java
with
6 additions
and
6 deletions
Turtle.java
+
6
−
6
View file @
8b2e3f0c
...
...
@@ -11,7 +11,7 @@ import java.awt.image.BufferedImage;
import
javax.swing.JFrame
;
import
javax.swing.JPanel
;
import
java.util.HashMap
;
import
java.util.
Linked
HashMap
;
/**
* Diese Klasse definiert Turtles, die mit einfachen
...
...
@@ -31,7 +31,8 @@ import java.util.HashMap;
* @author Axel Schmolitzky
* @author Fredrik Winkler
* @author Clara Marie Lueders
* @version 5. Dezember 2018
* @author Lasse Huber-Saffer
* @version 25. Januar 2022
*/
public
class
Turtle
{
...
...
@@ -52,12 +53,12 @@ public class Turtle
private
int
_verzoegerung
;
// Moegliche Farbwerte
private
static
final
HashMap
<
String
,
Color
>
FARBEN
;
private
static
final
Linked
HashMap
<
String
,
Color
>
FARBEN
;
private
static
final
Color
[]
FARB_ARRAY
;
static
{
FARBEN
=
new
HashMap
<
String
,
Color
>();
FARBEN
=
new
Linked
HashMap
<
String
,
Color
>();
FARBEN
.
put
(
"schwarz"
,
Color
.
BLACK
);
FARBEN
.
put
(
"blau"
,
Color
.
BLUE
);
FARBEN
.
put
(
"cyan"
,
Color
.
CYAN
);
...
...
@@ -298,8 +299,7 @@ class TurtleWelt
BufferedImage
image
=
new
BufferedImage
(
WIDTH
,
HEIGHT
,
BufferedImage
.
TYPE_INT_RGB
);
_graphics
=
image
.
createGraphics
();
_graphics
.
setRenderingHint
(
RenderingHints
.
KEY_ANTIALIASING
,
RenderingHints
.
VALUE_ANTIALIAS_ON
);
_graphics
.
setRenderingHint
(
RenderingHints
.
KEY_ANTIALIASING
,
RenderingHints
.
VALUE_ANTIALIAS_ON
);
_graphics
.
setColor
(
Color
.
WHITE
);
_graphics
.
fillRect
(
0
,
0
,
WIDTH
,
HEIGHT
);
...
...
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