-
Notifications
You must be signed in to change notification settings - Fork 0
/
player_old.rb
75 lines (63 loc) · 1.52 KB
/
player_old.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
# require 'debugger'
# class Player
# def play_turn(warrior)
# @health ||= warrior.health
# @startAtWall ||= warrior.feel(:backward).wall?
# #debugger
# if warrior.feel(:backward).wall?
# @startAtWall = true
# end
# if !@startAtWall and !warrior.feel(:backward).wall?
# if warrior.feel(:backward).captive?
# warrior.rescue!(:backward)
# elsif !warrior.feel(:backward).empty?
# warrior.pivot!
# else
# warrior.walk!(:backward)
# end
# return
# end
# if warrior.feel.captive?
# warrior.rescue!
# return
# end
# if warrior.feel.empty?
# if @health < 20 and @health <= warrior.health
# warrior.rest!
# else
# look_values = warrior.look.collect{|i| i.to_s}
# if @health < 12 and @health > warrior.health
# warrior.walk!(:backward)
# elsif look_values.include?("Wizard")
# puts 'hit the break'
# warrior.shoot!
# elsif look_values.include?("Archer")
# puts 'shoot the archer'
# warrior.shoot!
# elsif look_values.include?("Sludge")
# puts 'shoot the sludge'
# warrior.shoot!
# else
# warrior.walk!
# end
# end
# else
# warrior.attack!
# end
# @health = warrior.health
# end
# def equip_weapon(target)
# case target
# when "Wizard"
# do shoot Wizard with bow
# when "Archer"
# do shoot archer with bow
# else attack with sword
# end
# end
# def observe()
# end
# def theatened(look_array)
# look_array
# end
# end