tclog 0.2.3 → 0.2.4

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 +31 -30
  3. data/tclog.gemspec +1 -1
  4. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
data/lib/tclog.rb CHANGED
@@ -327,6 +327,36 @@ module TCLog
327
327
  case o[0]
328
328
  when "Match"
329
329
  if match_flag
330
+ if specops_total && match_wins
331
+ game.add_round specops_total, terrorists_total, match_wins
332
+ match_wins = nil
333
+ terrorists_total = nil
334
+ specops_total = nil
335
+ end
336
+ else
337
+ match_flag = true
338
+ end
339
+ if match[-1][0] == "Map"
340
+ game.add_map match[-1][1]
341
+ end
342
+ when "UnknownWin"
343
+ match_wins = :unknown if match_flag
344
+ when "TerroristsWin"
345
+ match_wins = :terrorists if match_flag
346
+ when "SpecopsWin"
347
+ match_wins = :specops if match_flag
348
+ when "Terrorists", "Specops"
349
+ if match_flag
350
+ unless game.players[o[1][:name]]
351
+ game.add_player(o[1][:name])
352
+ end
353
+ game.players[o[1][:name]].add_result(game.round_r+1,o[1])
354
+ end
355
+ when "TerroristsTotal"
356
+ terrorists_total = o[1] if match_flag
357
+ when "SpecopsTotal"
358
+ if match_flag
359
+ specops_total = o[1]
330
360
  unless specops_total
331
361
  specops_total = {
332
362
  :name => "Totals",
@@ -359,36 +389,7 @@ module TCLog
359
389
  :rate => 0,
360
390
  }
361
391
  end
362
- if specops_total && match_wins
363
- game.add_round specops_total, terrorists_total, match_wins
364
- match_wins = nil
365
- terrorists_total = nil
366
- specops_total = nil
367
- end
368
- else
369
- match_flag = true
370
- end
371
- if match[-1][0] == "Map"
372
- game.add_map match[-1][1]
373
- end
374
- when "UnknownWin"
375
- match_wins = :unknown if match_flag
376
- when "TerroristsWin"
377
- match_wins = :terrorists if match_flag
378
- when "SpecopsWin"
379
- match_wins = :specops if match_flag
380
- when "Terrorists", "Specops"
381
- if match_flag
382
- unless game.players[o[1][:name]]
383
- game.add_player(o[1][:name])
384
- end
385
- game.players[o[1][:name]].add_result(game.round_r+1,o[1])
386
- end
387
- when "TerroristsTotal"
388
- terrorists_total = o[1] if match_flag
389
- when "SpecopsTotal"
390
- if match_flag
391
- specops_total = o[1]
392
+
392
393
  match_wins = compare_score(terrorists_total, specops_total) if match_wins == :unknown
393
394
  end
394
395
  end
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.3"
8
+ s.version = "0.2.4"
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
- - 3
9
- version: 0.2.3
8
+ - 4
9
+ version: 0.2.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Shota Fukumori