software_challenge_client 21.0.1 → 21.0.2

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
  SHA256:
3
- metadata.gz: fb6f7046235b14fdf74c293c8c4f1b40a014373f949e9c9987f1ee36db6e579f
4
- data.tar.gz: 95cb06324e9ae3ef77e7a76200bd45f47af3176f18f744f138c835d14ef7ade2
3
+ metadata.gz: c65e973b488cf092e716716135e61c348b62d899a77c821aae0e44e340667888
4
+ data.tar.gz: 1d4511f7ba6c1dffc6344b523cc3cf04ef3e114a962d3edf2d0cc8dd9382190b
5
5
  SHA512:
6
- metadata.gz: 382fe8164ebb55803018b0ebec3c04061d9fbc65e770702383190ea9a5279f5cb6e0ddcbb12e3a3b3057d31450f416f4388d3ddafb1e14447c15bd2fb16a937a
7
- data.tar.gz: fa76ba63c8634597486a9b34665a0c731870a25ace4ddef3d4b9b05206b6c31e97077a2bf12106193e321dfec6225c99d3361435d8938229169e77ecad9b0c3a
6
+ metadata.gz: 9e9416cc5a08cd30f7c969edc29a5a5f8c496cc3fa5a1b3c4c7222f4a1ecc653fb2777c1d64e4ac389801d2ad4288901b956366c500835bfc58f51b02d256aa3
7
+ data.tar.gz: d7aabbb618c88b80f8845e72199a4ccf377980aa82f7ed260de1cb9c6c52435d5d0ef4b985a2fff786737c40b6f8fea422dae08a4a906591bbe83daffa695a94
@@ -1,3 +1,7 @@
1
+ = 21.0.2
2
+
3
+ Fixed problem which caused `last_move` of a `GameState` always be `nil` (thanks to wollw!).
4
+
1
5
  = 21.0.1
2
6
 
3
7
  Improved performance and defined Ruby version 2.5.5 as minimum requirement
@@ -82,12 +82,6 @@ class Protocol
82
82
  shape = PieceShape.to_a.find {|s| s.key == @context[:last_text].to_sym }
83
83
  @gamestate.undeployed_green_pieces << shape
84
84
  end
85
- when 'yellowShapes'
86
-
87
- when 'redShapes'
88
-
89
- when 'greenShapes'
90
-
91
85
  end
92
86
  end
93
87
 
@@ -193,6 +187,14 @@ class Protocol
193
187
  @context[:last_move_type] = type
194
188
  @context[:piece_target] = :last_move
195
189
  end
190
+ when 'position'
191
+ case @context[:piece_target]
192
+ when :last_move
193
+ x = attrs['x'].to_i
194
+ y = attrs['y'].to_i
195
+ piece = @context[:last_move_piece]
196
+ @gamestate.last_move = SetMove.new(Piece.new(piece.color, piece.kind, piece.rotation, piece.is_flipped, Coordinates.new(x, y)))
197
+ end
196
198
  when 'startColor'
197
199
  @gamestate.start_color = Color::BLUE
198
200
  when 'winner'
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
  # frozen_string_literal: true
3
3
  module SoftwareChallengeClient
4
- VERSION = '21.0.1'
4
+ VERSION = '21.0.2'
5
5
  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: 21.0.1
4
+ version: 21.0.2
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: 2020-11-20 00:00:00.000000000 Z
13
+ date: 2020-11-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: builder