Skip to content

Commit

Permalink
21/06/22 reduce : findlive() の実装10 RBS close #1
Browse files Browse the repository at this point in the history
  • Loading branch information
righ1113 committed Jun 21, 2021
1 parent afd84cb commit a0f44ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion program/app/reduce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def self.reduce

Assert.assertions = 0

ret = g_confs.data[0..4].each_with_index.all? do |g_conf, i|
return if (data = g_confs.data[0..4]).nil?
ret = data.each_with_index.all? do |g_conf, i|
puts ''
p i
c_d_reducible? g_conf, i
Expand Down
6 changes: 4 additions & 2 deletions program/lib/c_read_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ def initialize(deg)
def read_file(deg)
p 'Tactics read_file() start'
@tacs = []
File.foreach(format('../4ct_data/d_tactics%02<num>d.txt', num: deg)) do |line|
tacs << line.chomp.split # chomp: 改行文字を削除
File.open(format('../4ct_data/d_tactics%02<num>d.txt', num: deg)) do |f|
f.each_line do |line|
tacs << line.chomp.split # chomp: 改行文字を削除
end
end
true
end
Expand Down
2 changes: 1 addition & 1 deletion program/sig/reduce.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module ReadFile
end

class Tactics < ReadFile
attr_reader tacs: Array[bot]
attr_reader tacs: Array[Array[String]]
def initialize: (Integer deg) -> void

private
Expand Down

0 comments on commit a0f44ba

Please sign in to comment.