-
Notifications
You must be signed in to change notification settings - Fork 0
/
command.rb
97 lines (86 loc) · 2.93 KB
/
command.rb
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
# encoding: utf-8
#
# Archivo proporcionado por el Departamento de Lenguajes y Sistemas Informáticos de la UGR
# Todos los derechos reservados, usa esto bajo tu propia responsabilidad.
module Test
module Command
EXIT = :EXIT
GOBACK = :GOBACK
COMBAT = :COMBAT
SHOWMONSTER = :SHOWMONSTER
SHOWVISIBLETREASURE = :SHOWVISIBLETREASURE
SHOWHIDDENTREASURE = :SHOWHIDDENTREASURE
DISCARDVISIBLETREASURE = :DISCARDVISIBLETREASURE
DISCARDHIDDENTREASURE = :DISCARDHIDDENTREASURE
MAKETREASUREVISIBLE = :MAKETREASUREVISIBLE
BUYLEVELS = :BUYLEVELS
BUYWITHVISIBLES = :BUYWITHVISIBLES
BUYWITHHIDDEN = :BUYWITHHIDDEN
NEXTTURN = :NEXTTURN
NEXTTURNALLOWED = :NEXTTURNALLOWED
def Command.getText(aValue)
case aValue
when :EXIT then
"Salir del juego"
when :GOBACK then
"Menu anterior"
when :COMBAT then
"A C O M B A T I R !"
when :SHOWMONSTER then
"Mostrar monstruo"
when :SHOWVISIBLETREASURE then
"Mostrar tesoros visibles"
when :SHOWHIDDENTREASURE then
"Mostrar tesoros ocultos"
when :DISCARDVISIBLETREASURE then
"Descartar tesoro visible"
when :DISCARDHIDDENTREASURE then
"Descartar tesoro oculto"
when :MAKETREASUREVISIBLE then
"Equipar tesoro"
when :BUYLEVELS then
"Comprar niveles"
when :BUYWITHVISIBLES then
"Anadir visibles a la lista de la compra"
when :BUYWITHHIDDEN then
"Anadir ocultos a la lista de la compra"
when :NEXTTURN then
"Siguiente turno"
when :NEXTTURNALLOWED then
"Siguiente turno permitido"
end
end
def Command.getMenu(aValue)
case aValue
when :EXIT then
0
when :GOBACK then
-1
when :COMBAT then
69
when :SHOWMONSTER then
10
when :SHOWVISIBLETREASURE then
11
when :SHOWHIDDENTREASURE then
12
when :DISCARDVISIBLETREASURE then
21
when :DISCARDHIDDENTREASURE then
22
when :MAKETREASUREVISIBLE then
23
when :BUYLEVELS then
33
when :BUYWITHVISIBLES then
31
when :BUYWITHHIDDEN then
32
when :NEXTTURN then
1
when :NEXTTURNALLOWED then
2
end
end
end
end