-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShiny_Worldz.pde
77 lines (49 loc) · 1.13 KB
/
Shiny_Worldz.pde
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
/*
Artist: Ian Van Meter
Date: 5-7-2020
Title: "Shiny_Worldz"
*/
PImage pic;
int shift, variance, pack, chance;
Card pull;
Card setter = new Card();
FoilEffectz shine;
ArrayList<Card> deck = new ArrayList<Card>();
void setup() {
size(950, 700, JAVA2D);
frameRate(2);
variance = int(random(setter.getCardPool()));
pack = constrain(variance, 0, setter.getCardPool());
pull = new Card(pack);
deck.add(pull);
println(pull.cardz[pack]);
}
void draw() {
if (deck.size() == 1 || deck.size() == 4) {
pull.dithering3();
}
if (deck.size() == 2 || deck.size() == 5) {
pull.dithering1();
}
if (deck.size() == 3 || deck.size() == 6) {
pull.dithering2();
}
pull.display();
if (deck.size() > 2)
shine = new FoilEffectz(pull.getChance());
if (shift == 12){
changeCard();
shift = 0;
}
if (deck.size() == 7)
exit();
shift++;
}
void changeCard() {
variance = int(random(setter.getCardPool()));
pack = constrain(variance, 0, setter.getCardPool());
chance = int(random(1, 6));
pull.nextCard(pack, chance);
deck.add(pull);
println(pull.cardz[pack]);
}