-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApplicationSimulator.java
109 lines (97 loc) · 4.9 KB
/
ApplicationSimulator.java
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
/*
* ApplicationSimulator.java
*
* @autor Claudio, Jerry, Joe, Francisco
* @since 5-6-2022
*/
package oober;
/**
* The Class ApplicationSimulator.
*/
public class ApplicationSimulator implements IApplicationSimulator {
/** The company. */
private TaxiCompany company;
/**
* Instantiates a new application simulator.
*
* @param company the company
*/
public ApplicationSimulator(TaxiCompany company) {
this.company = company;
}
/**
* User request.
*/
@Override
public void userRequest() {
int user = this.company.getAvailableUserForRequest();
if (user != -1)
this.company.requestService(user);
}
/**
* Show.
*/
@Override
public void show() {
System.out.println(this.company.show());
}
/**
* Update.
*/
@Override
public void update() {
this.company.update();
}
/**
* Notify.
*
* @param message the message
*/
@Override
public void notify(String message) {
System.out.println(message);
}
/**
* Gets the total services.
*
* @return the total services
*/
@Override
public int getTotalServices() {
return this.company.getTotalServices();
}
/**
* Show statistics.
*/
@Override
public void showStatistics() {
System.out.println(this.company.showStatistics());
}
/**
* Elon buys you.
*/
public void elonBuysYou() { // Maybe... just maybe...
int chance = Functions.rand(69);
if (chance % 4 == 0) {
System.out.println(" ⠄⠄⠄⠄⠄⠄⣀⣀⣀⣤⣶⣿⣿⣶⣶⣶⣤⣄⣠⣴⣶⣿⣿⣿⣿⣶⣦⣄⠄⠄\n"
+ "⠄⠄⣠⣴⣾⣿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦\n"
+ "⢠⠾⣋â£â£„⡀⠄⠄⠈⠙⠻⣿⣿⡿⠛⠋⠉⠉⠉⠙⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿\n"
+ "⡎⣾⡟⢻⣿⣷⠄⠄⠄⠄⠄⡼⣡⣾⣿⣿⣦⠄⠄⠄⠄⠄⠈⠛⢿⣿⣿⣿⣿⣿\n"
+ "⡇⢿⣷⣾⣿⠟⠄⠄⠄⠄⢰â �⣿⣇⣸⣿⣿⠄⠄⠄⠄⠄⠄⠄⣠⣼⣿⣿⣿⣿\n"
+ "⢸⣦â£â£â£„⣤⣤⣤⣴⣶⣿⣧⡘⠻⠛⠛â �⠄⠄⠄⠄⣀⣴⣿⣿⣿⣿⣿⣿⣿\n"
+ "⠄⢉⣹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣦⣶⣶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
+ "⢰⡿⠛⠛⠛⠛⠻⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
+ "⠸⡇⠄⠄⢀⣀⣀⠄⠄⠄⠄⠄⠉⠉⠛⠛⠻⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
+ "⠄⠈⣆⠄⠄⢿⣿⣿⣿⣷⣶⣶⣤⣤⣀⣀⡀⠄⠄⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
+ "⠄⠄⣿⡀⠄⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠂⠄⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
+ "⠄⠄⣿⡇⠄⠄⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠄⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
+ "⠄⠄⣿⡇⠄â ⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠄⠄⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿\n"
+ "⠄⠄⣿â �â „â �⠛⠛⠛⠛⠉⠉⠉⠉⠄⠄⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿\n"
+ "⠄⠄⠻⣦⣀⣀⣀⣀⣀⣀⣤⣤⣤⣤⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠄");
System.out.println("\tCongratulations! Elon Musk bought OOBER for a total of 53 Billion Dollars. You are now rich and enslaved!");
}
else {
System.out.println("Taxify - Version 2.0 : by Jerry, Claudio, Joe, and Francisco.");
}
}
}