tclog 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/tclog.rb +15 -0
  3. data/tclog.gemspec +1 -1
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
data/lib/tclog.rb CHANGED
@@ -323,7 +323,19 @@ module TCLog
323
323
  match_wins = nil
324
324
  terrorists_total = nil
325
325
  specops_total = nil
326
+ flag2 = false
327
+ include_match = orders.include?("Match")
326
328
  vm = Proc.new do |o|
329
+ if !match_flag && /Win$/ =~ o[0]
330
+ match_flag = true
331
+ end
332
+ if /Win$/ =~ o[0] && flag2 && specops_total && match_wins
333
+ game.add_round specops_total, terrorists_total, match_wins
334
+ match_wins = nil
335
+ terrorists_total = nil
336
+ specops_total = nil
337
+ flag2 = false
338
+ end
327
339
  case o[0]
328
340
  when "Match"
329
341
  if match_flag
@@ -332,9 +344,11 @@ module TCLog
332
344
  match_wins = nil
333
345
  terrorists_total = nil
334
346
  specops_total = nil
347
+ flag2 = false
335
348
  end
336
349
  else
337
350
  match_flag = true
351
+ flag2 = true
338
352
  end
339
353
  if match[-1][0] == "Map"
340
354
  game.add_map match[-1][1]
@@ -351,6 +365,7 @@ module TCLog
351
365
  game.add_player(o[1][:name])
352
366
  end
353
367
  game.players[o[1][:name]].add_result(game.round_r+1,o[1])
368
+ flag2 = true
354
369
  end
355
370
  when "TerroristsTotal"
356
371
  terrorists_total = o[1] if match_flag
data/tclog.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tclog}
8
- s.version = "0.2.4"
8
+ s.version = "0.2.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Shota Fukumori"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 4
9
- version: 0.2.4
8
+ - 5
9
+ version: 0.2.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Shota Fukumori