-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBranch.java
More file actions
125 lines (83 loc) · 1.89 KB
/
Branch.java
File metadata and controls
125 lines (83 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
//branches super class that will hold all the different branches
import java.util.*;
import java.util.Scanner;
public class Branch{
private int code1;
private int code2;
private String name;
private boolean pass;
private boolean hasWon;
private static int level;
private String op1;
private String op2;
private String imageSpot;
private String label;
public Branch(int c1, int c2){
code1 = c1;
code2 = c2;
convertNumtoString(c1);
name+= code2;
pass = false;
hasWon = false;
}
public Branch(int c1, int c2, String o1, String o2, String imag, String lab){
code1 = c1;
code2 = c2;
convertNumtoString(c1);
name+= " " + code2;
pass = false;
hasWon = false;
op1 = o1;
op2 = o2;
imageSpot = imag;
label = lab;
}
public int getCode1(){
return code1;
}
public int getCode2(){
return code2;
}
public String getOp1(){
return op1;
}
public String getOp2(){
return op2;
}
public String getLabel(){
return label;
}
public String getImage(){
return imageSpot;
}
public String getName(){
return name;
}
public boolean getPass(){
return pass;
}
public boolean getStatus(){
return hasWon;
}
public void passLevel(){
pass = true;
}
public void failLevel(){
pass = false;
}
//this sets the label on the branch
public void setLabel(String l){
label=l;
}
public void convertNumtoString(int a){
if(a == 0){
name = "APCS Classroom";
}
if(a == 1){
name = "Chris Border Planet";
}
if(a == 2){
name = "Water planet";
}
}
}