Class: GamesParadise::Antamar
- Inherits:
-
Base
- Object
- Base
- GamesParadise::Antamar
show all
- Defined in:
- lib/games_paradise/antamar/antamar.rb
Overview
Constant Summary
collapse
- ANTAMAR_URL =
'https://eisentrutz.antamar.eu/'
- MINUTE =
#
MINUTE
n seconds for one minute, hence 60.
#
60
Constants inherited
from Base
Base::CONTROL_C_CODE, Base::N
Class Method Summary
collapse
-
.[](i = '') ⇒ Object
# === GamesParadise::Antamar[] ========================================================================= #.
Instance Method Summary
collapse
Methods inherited from Base
#cat, #commandline_arguments?, #efancy, #eparse, #first_argument?, #forestgreen, #gold, #lightblue, #lightgreen, #mediumorchid, #mediumslateblue, #opnn, #peru, #register_sigint, #rev, #royalblue, #set_commandline_arguments, #sfile, #steelblue, #teal, #tomato, #yellow
Methods included from BaseModule
#cliner, #commandline_arguments?, #first_argument?, #infer_the_namespace, #namespace?, #rename_file, #reset_the_internal_hash, #return_pwd, #set_commandline_arguments
Constructor Details
#initialize(commandline_arguments = nil, run_already = true) ⇒ Antamar
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/games_paradise/antamar/antamar.rb', line 39
def initialize(
commandline_arguments = nil,
run_already = true
)
reset
set_commandline_arguments(
commandline_arguments
)
run if run_already
end
|
Class Method Details
.[](i = '') ⇒ Object
#
GamesParadise::Antamar[]
#
130
131
132
|
# File 'lib/games_paradise/antamar/antamar.rb', line 130
def self.[](i = '')
new(i)
end
|
Instance Method Details
#briefbote ⇒ Object
82
83
84
85
86
|
# File 'lib/games_paradise/antamar/antamar.rb', line 82
def briefbote
Open.in_browser(
ANTAMAR_URL+'Rathaus.php?aktion=jobcenter&startid=425'
)
end
|
#die_selbe_aufgabe_erneut_annehmen ⇒ Object
#
die_selbe_aufgabe_erneut_annehmen
#
73
74
75
76
77
|
# File 'lib/games_paradise/antamar/antamar.rb', line 73
def die_selbe_aufgabe_erneut_annehmen
spiel_php
sleep 3
briefbote
end
|
#enter_the_primary_loop ⇒ Object
#
enter_the_primary_loop
#
100
101
102
103
104
105
106
|
# File 'lib/games_paradise/antamar/antamar.rb', line 100
def enter_the_primary_loop
loop {
die_selbe_aufgabe_erneut_annehmen
_ = @task_duration_in_n_minutes * MINUTE+rand(122)
sleep(_)
}
end
|
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
# File 'lib/games_paradise/antamar/antamar.rb', line 111
def (
i = commandline_arguments?
)
if i.is_a? Array
i.each {|entry| (entry) }
else
case i when /^-?-?briefbote/
die_selbe_aufgabe_erneut_annehmen
end
end
end
|
#reset ⇒ Object
53
54
55
56
57
58
59
60
|
# File 'lib/games_paradise/antamar/antamar.rb', line 53
def reset
super()
infer_the_namespace
@task_duration_in_n_minutes = 30 end
|
#run ⇒ Object
65
66
67
68
|
# File 'lib/games_paradise/antamar/antamar.rb', line 65
def run
end
|
#spiel_php ⇒ Object
91
92
93
94
95
|
# File 'lib/games_paradise/antamar/antamar.rb', line 91
def spiel_php
Open.in_browser(
ANTAMAR_URL+'spiel.php'
)
end
|