|
@@ -0,0 +1,78 @@
|
|
1
|
+package io.zipcoder.casino;
|
|
2
|
+
|
|
3
|
+import java.util.Random;
|
|
4
|
+import java.util.Scanner;
|
|
5
|
+
|
|
6
|
+public class SlotMachine implements Game, Gamble {
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+ @Override
|
|
10
|
+ public void Bet(int betAmount) {
|
|
11
|
+
|
|
12
|
+ }
|
|
13
|
+
|
|
14
|
+ @Override
|
|
15
|
+ public int Payout(int payoutAmount) {
|
|
16
|
+ return 0;
|
|
17
|
+ }
|
|
18
|
+
|
|
19
|
+ @Override
|
|
20
|
+ public void Quit() {
|
|
21
|
+
|
|
22
|
+ }
|
|
23
|
+
|
|
24
|
+ @Override
|
|
25
|
+ public void StartGame() {
|
|
26
|
+
|
|
27
|
+ }
|
|
28
|
+
|
|
29
|
+ @Override
|
|
30
|
+ public void StartRound() {
|
|
31
|
+
|
|
32
|
+ }
|
|
33
|
+
|
|
34
|
+ public static void main(String[] args) {
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+ //System.out.println("Enter the amount of money you wan to enter into the slot machine");
|
|
38
|
+ Scanner scanner = new Scanner(System.in);
|
|
39
|
+
|
|
40
|
+ String word="";
|
|
41
|
+ String outputword="";
|
|
42
|
+
|
|
43
|
+ Random rand = new Random();
|
|
44
|
+
|
|
45
|
+ for(int i = 1; i <=3;i++){
|
|
46
|
+ int randnum = rand.nextInt(6);
|
|
47
|
+
|
|
48
|
+ if(randnum ==0) {
|
|
49
|
+ word = "DOG";
|
|
50
|
+ }
|
|
51
|
+ else if(randnum ==1) {
|
|
52
|
+ word = "CAT";
|
|
53
|
+ }
|
|
54
|
+ else if(randnum ==2) {
|
|
55
|
+ word = "RABBIT";
|
|
56
|
+ }
|
|
57
|
+ else if(randnum ==3) {
|
|
58
|
+ word = "SQUIRREL";
|
|
59
|
+ }
|
|
60
|
+ else if(randnum ==4) {
|
|
61
|
+ word = "FISH";
|
|
62
|
+ }
|
|
63
|
+ else if(randnum ==5) {
|
|
64
|
+ word = "MOUSE";
|
|
65
|
+ }
|
|
66
|
+ outputword += word;
|
|
67
|
+ }
|
|
68
|
+
|
|
69
|
+ System.out.println(outputword);
|
|
70
|
+
|
|
71
|
+ if(){}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+}
|
|
76
|
+
|
|
77
|
+}
|
|
78
|
+
|