Skip to content

Commit

Permalink
added wheel functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
juntinuous committed Jul 29, 2024
1 parent 8c005aa commit e67e06f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/main/java/uta/cse3310/Wheel.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
package uta.cse3310;
import java.util.Random;

public class Wheel {
private String[] item;
private String[] item = {"money", "bankrupt_another_player", "other"};


public String getRandomItem() {
return null;

Random random = new Random();
int random_number = random.nextInt(2); // randome nubmer between 0~2
String random_item = item[random_number];

System.out.print(random_item);
return random_item;


}
}

0 comments on commit e67e06f

Please sign in to comment.