-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnew_script.gd
More file actions
37 lines (34 loc) · 898 Bytes
/
new_script.gd
File metadata and controls
37 lines (34 loc) · 898 Bytes
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
extends Node2D
#изначально два массива человек и бот
var gamer = []
var Bot = []
Bot = [0]
var Result=1
#сообщение о победе в раунде
#вывод статистики
#func _statistic():
# for x in range(10):
# Stat=[gamer(x):Bot(x)] #-как записать
# print (statistic["Stat"])
#окошко выбора бота становитс видимым
#func bot_action():
# if Bot[-1]==0:
# icon_game_action0.visible()
# elif Bot[-1]==1:
# icon_game_action1.visible()
# elif Bot[-1]==2:
# icon_game_action2.visible()
#выбор следующего действи бота .add
func bot_next_action():
if result==2:
Bot.append(Bot[-1]-1)
if Bot([-1]=-1:
Bot.pop(-1)
Bot.append(2)
elif result==1:
Bot.append(Bot[-1]+1)
if Bot[-1]=3:
Bot.pop(-1)
Bot.append(0)
elif Bot[-1]=gamer[-1]:
Bot.append(gamer[-1])