software_challenge_client 19.0.0 → 19.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 42f624c3d6632a5451ccd927967699ce2c663340
4
- data.tar.gz: 5e8540a594b7a896535c64a617c80e50d801c9db
3
+ metadata.gz: 5dc4b552ff92003fb5d2747708da562ec2df08d3
4
+ data.tar.gz: d8659a3848f772399f7e5ac01276906c2b54500c
5
5
  SHA512:
6
- metadata.gz: efbae299e27a8a7db3aa5cf706c2e0c4a987647822103d59394ebee3bbb6367d7f0308cf8173c519a81a228277ab0f1ca0e78cd8b914e6afef681eb5d7a8a309
7
- data.tar.gz: 2b35430ade3b3cb6edfda0c8f29b5b6dc131f5f278da1f88a4cbec9a1f06b336d7fa2fb457eefd8ac758f6086021b12e10767eb6364494823477ea560e7afb93
6
+ metadata.gz: 95a8f931bd02f397a794be57b355c334d72995c3575b7f666806cee8b1053b8ca967b859c0329dfa90d31e5835b69465388c1833d3cf77a83b2ced7dc7813332
7
+ data.tar.gz: 290d781e069b53c6a47d2610e45d150e1fdfe2e1c039880ceadad4da94ec1c9d3d8f5205aa901ef4fa3c970545f5ba0c535dff9190f0889f5728bc7889b29dc4
@@ -1,3 +1,11 @@
1
+ = 19.0.1
2
+
3
+ - fixed bug in swarm size calculation (thanks to wollw!)
4
+
5
+ = 19.0.0
6
+
7
+ First version for game "Piranhas"
8
+
1
9
  = 1.2.1
2
10
 
3
11
  - fixed a bug which could lead to an infinite loop in the possible_move method
@@ -196,8 +196,9 @@ class GameRuleLogic
196
196
  # @param current_biggest_swarm [Set<Field>] Aktuell größte zusammenhängende Feldmenge. Für rekursiven Aufruf.
197
197
  # @return [Set<Field>]
198
198
  def self.greatest_swarm_from_fields(board, fields_to_check, current_biggest_swarm = Set.new)
199
- # stop searching when the size of the current found biggest set is bigger than the rest of the fields
200
- return current_biggest_swarm if current_biggest_swarm.size > fields_to_check.size
199
+ # stop searching when the size of the current found biggest set is bigger
200
+ # than the rest of the fields or if there are no more fields to check
201
+ return current_biggest_swarm if current_biggest_swarm.size > fields_to_check.size || fields_to_check.empty?
201
202
 
202
203
  # start a new set of adjacent fields with the first field in fields_to_check
203
204
  current_swarm = Set.new
@@ -1,4 +1,4 @@
1
1
  # encoding: UTF-8
2
2
  module SoftwareChallengeClient
3
- VERSION = "19.0.0"
3
+ VERSION = "19.0.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: software_challenge_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 19.0.0
4
+ version: 19.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 'kwollw '
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2018-09-25 00:00:00.000000000 Z
13
+ date: 2018-10-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: typesafe_enum