admiral_stats_parser 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +14 -0
- data/lib/admiral_stats_parser/model/event_info.rb +12 -0
- data/lib/admiral_stats_parser/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9e468bdbc7341d12bbac3eb19cba7995141628e
|
4
|
+
data.tar.gz: 02dfb8ffd40b36220449e5688ab9b63ffdf6b6bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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回目以降かを表すフラグ
|