Skip to content

Commit

Permalink
Problems (34)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonScripter committed Jan 12, 2024
1 parent 44b0ca5 commit 140d48f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
arguments=
arguments=--init-script C\:\\Users\\dylan\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\1.25.1\\config_win\\org.eclipse.osgi\\55\\0\\.cp\\gradle\\init\\init.gradle --init-script C\:\\Users\\dylan\\AppData\\Roaming\\Code\\User\\globalStorage\\redhat.java\\1.25.1\\config_win\\org.eclipse.osgi\\55\\0\\.cp\\gradle\\protobuf\\init.gradle
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=
java.home=C\:/Program Files/Amazon Corretto/jdk17.0.6_10
jvm.arguments=
offline.mode=false
override.workspace.settings=true
Expand Down
41 changes: 41 additions & 0 deletions src/main/java/programming/school/student/dylan/Lesson10Tarok.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package programming.school.student.dylan;

import java.util.Random;

import programming.school.tarok.TarokDeck;
import programming.school.tarok.TarokSet;

public class Lesson10Tarok {

public static void main(String[] args) {

// He is so strongeus!
Random randoguys = new Random();
randoguys.nextInt(6);

// Create a deck, fully sorted.
TarokDeck t = new TarokDeck();

for (int i=0; i<1000; i++) {
t.swap(randoguys.nextInt(54), randoguys.nextInt(54));
}

// Print out the deck.
System.out.println(t);

// Deal 12 cards.
TarokSet h = t.deal(12);

// Print them out.
System.out.println(h);

// Swap the cards at index 0 and 6.

for (int i=0; i<1000; i++) {
h.swap(randoguys.nextInt(12), randoguys.nextInt(12));
}

// Print them out.
System.out.println(h);
}
}

0 comments on commit 140d48f

Please sign in to comment.