admiral_stats_parser 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1252d0f0a0892001344347cf23dcde7b91c31026
4
- data.tar.gz: c52f091e0cedcafdb7d7b09dede68d5c62f7dcf5
3
+ metadata.gz: a9e468bdbc7341d12bbac3eb19cba7995141628e
4
+ data.tar.gz: 02dfb8ffd40b36220449e5688ab9b63ffdf6b6bf
5
5
  SHA512:
6
- metadata.gz: e1f668fedae8dc76698784d09cc14200aa1495b45c0c0b8441c15a299071c28c340e22147b139959b101d1eadfe7c4eb4de056470524f69861283f33a6467841
7
- data.tar.gz: bf5a5db1862efee5fe6b9b7365fe20f6cf738c2c83119e00df7f1edbd9411c2aada3670c45c7241ea15a39da43ee1a43f4d0bb3abb58e2143bc8f50721741dd5
6
+ metadata.gz: 1703ef0cce3ec85d6909f3f9cc63e230a4734aa76cd267765a55e7a89037ecba26081135d89778c9eaac37f01fb71c11ef6304675a1a83ebe1f564e713b37a39
7
+ data.tar.gz: d221dd576e9216b5cc819e697e01d0219f485903d1d3f88722381cb6a8e8f996d6dc9aba5efe0cdc14c11de376c4ee49dde59522d6d5fa8e483ffad25c107b91
data/README.md CHANGED
@@ -83,6 +83,20 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
83
83
 
84
84
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
85
85
 
86
+ ## Test
87
+
88
+ ```
89
+ $ bundle exec rake spec
90
+ ```
91
+
92
+ ## Release
93
+
94
+ ```
95
+ $ vi lib/admiral_stats_parser/version.rb
96
+ $ bundle exec rake build
97
+ $ bundle exec rake release
98
+ ```
99
+
86
100
  ## Contributing
87
101
 
88
102
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/admiral_stats_parser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -148,6 +148,18 @@ class EventInfo
148
148
  cleared ? loop_count : loop_count - 1
149
149
  end
150
150
 
151
+ # 与えられたリストから、突破済みのサブ海域番号の最大値を返します。
152
+ # まだ突破している海域がない場合は 0 を返します。
153
+ def self.cleared_area_sub_id(event_info_list, level)
154
+ list = event_info_list.select{|info| info.level == level and info.area_clear_state == 'CLEAR' }
155
+
156
+ if list.size == 0
157
+ 0
158
+ else
159
+ list.map{|info| info.area_sub_id }.max
160
+ end
161
+ end
162
+
151
163
  # 海域撃破ボーナス
152
164
  class EventInfoReward
153
165
  # 初回攻略時か2回目以降かを表すフラグ
@@ -1,3 +1,3 @@
1
1
  module AdmiralStatsParser
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: admiral_stats_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro Yoshizawa