-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathd.lua
More file actions
34 lines (32 loc) · 1.02 KB
/
d.lua
File metadata and controls
34 lines (32 loc) · 1.02 KB
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
-- os.execute("clear")
-- UpdateGame(turn)
-- io.write("\n")
-- dicePrint()
-- io.write("\n")
-- print("결과 처리:")
-- print(players[turn].name .. "님 공격할 사람을 정해주세요(사거리1)")
-- local input = nil
-- repeat
-- input = key.getch()
-- os.execute("clear")
-- UpdateGame(turn)
-- io.write("\n")
-- dicePrint()
-- io.write("\n")
-- print("결과 처리:")
-- print(players[turn].name .. "님 공격할 사람을 정해주세요(사거리1)")
-- until input == keys.left or input == keys.right
-- local attackToPlayer = nil
-- if input == keys.right then
-- attackToPlayer = players[turn+1]
-- else
-- attackToPlayer = players[turn-1]
-- end
-- attackToPlayer.life = attackToPlayer.life - 1
-- os.execute("clear")
-- UpdateGame(turn)
-- io.write("\n")
-- dicePrint()
-- io.write("\n")
-- print(players[turn].name .. "님이" .. attackToPlayer.name .. "님을 공격했습니다.")
-- print(attackToPlayer.name .. "님의 체력은" ..attackToPlayer.life .. "남았습니다.")