Skip to content

Commit 651b5d8

Browse files
author
github-actions
committed
Google Java Format
1 parent 671c509 commit 651b5d8

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

Dice.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22

33
public class Dice {
44

5-
private int id;
6-
private int value;
5+
private int id;
6+
private int value;
77

8-
public Dice(int id) {
9-
this.id = id;
10-
rollTheDice();
11-
}
8+
public Dice(int id) {
9+
this.id = id;
10+
rollTheDice();
11+
}
1212

13-
public int getId() {
14-
return id;
15-
}
13+
public int getId() {
14+
return id;
15+
}
1616

17-
public int getValue() {
18-
return value;
19-
}
17+
public int getValue() {
18+
return value;
19+
}
2020

21-
public void rollTheDice() {
22-
Random random = new Random();
23-
value = random.nextInt(6) + 1;
24-
}
21+
public void rollTheDice() {
22+
Random random = new Random();
23+
value = random.nextInt(6) + 1;
24+
}
2525
}

Exercise.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
public class Exercise {
22

33
public static void main(String[] args) {
4-
Dice dice = new Dice(1);
4+
Dice dice = new Dice(1);
55

6-
System.out.println("ID - Wuerfelwert");
7-
for (int i = 1; i <= 5; i++) {
8-
dice.rollTheDice();
9-
System.out.println(dice.getId() + " - " + dice.getValue());
10-
}
6+
System.out.println("ID - Wuerfelwert");
7+
for (int i = 1; i <= 5; i++) {
8+
dice.rollTheDice();
9+
System.out.println(dice.getId() + " - " + dice.getValue());
10+
}
1111
}
1212
}

0 commit comments

Comments
 (0)