Commit 7992ca2 1 parent c90e181 commit 7992ca2 Copy full SHA for 7992ca2
File tree 3 files changed +7
-3
lines changed
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ def player_path
24
24
end
25
25
26
26
def load_path
27
- @profile . tower_path + "/level_" + @number . to_s . rjust ( 3 , '0' ) + ".rb"
27
+ File . join (
28
+ File . expand_path ( File . dirname ( __FILE__ ) + '/../../towers/' ) ,
29
+ File . basename ( @profile . tower_path ) + "/level_" +
30
+ @number . to_s . rjust ( 3 , '0' ) + ".rb"
31
+ )
28
32
end
29
33
30
34
def load_level
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def epic_score_with_grade
62
62
end
63
63
64
64
def tower
65
- Tower . new ( @tower_path )
65
+ Tower . new ( File . basename @tower_path )
66
66
end
67
67
68
68
def current_level
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ class Tower
3
3
attr_reader :path
4
4
5
5
def initialize ( path )
6
- @path = path
6
+ @path = File . join ( File . expand_path ( File . dirname ( __FILE__ ) + '/../../towers/' ) , path )
7
7
end
8
8
9
9
def name
You can’t perform that action at this time.
0 commit comments