-
Notifications
You must be signed in to change notification settings - Fork 1
/
forca.lua
33 lines (28 loc) · 881 Bytes
/
forca.lua
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
-- Script principal
-- com a estrutura visual do game.
Game = require("game") -- Importa arquivo game
function main()
Forca = Game:new() -- Instancia Objeto
continua = "S"
while(continua == "S" or continua == "s") do
ForcaGame:Clear()
print("-------------------------------------")
print(" FORCA LUA ")
print("-------------------------------------")
print("Digite o modo do jogo: ")
print("1 -> Multiplayer")
print("2 -> Singleplayer")
print("3 -> Sair")
io.write("> ")
mode = io.read("*number")
if mode ~= 3 then
Forca:Start(mode)
print("Voce deseja continuar jogando? (S/N) ")
continua = io.read()
else
io.close()
continua = "N"
end
end
end
main()