software_challenge_client 21.0.2 → 21.1.0
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/RELEASES.md +4 -0
- data/lib/software_challenge_client/piece.rb +26 -4
- data/lib/software_challenge_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a08a78bd14dd02e33b72e6263f1b5f378490d29a3200d66b83664a6ee3eeeeb7
|
4
|
+
data.tar.gz: b5bb2bf9b10e457d9a3a187025435cdda90d7b6010a079f5c7587d0ae134fdec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99c7dfa3c94c0db8ff13448dc718502c15d98063c98a16ee8e9eb066a510f1405662a7b0e56d5323bc74e712f38690d3047fe096de192e387babd0318477aae2
|
7
|
+
data.tar.gz: 2f011d42e30b16f40827c1a3411ceae2923490291faf4cfe63a295dfce7bc606ed755c4b028639c9d8f09eec2b3fdebba82bb077233856c360f5686022fdcd63
|
data/RELEASES.md
CHANGED
@@ -35,12 +35,33 @@ class Piece
|
|
35
35
|
@coords = coords_priv
|
36
36
|
end
|
37
37
|
|
38
|
+
# Dreht den Stein
|
39
|
+
def rotate!(rotation)
|
40
|
+
@rotation = @rotation.rotate(rotation)
|
41
|
+
@coords = coords_priv
|
42
|
+
end
|
43
|
+
|
44
|
+
# Flipped den Stein
|
45
|
+
def flip!(f = true)
|
46
|
+
@is_flipped = @is_flipped ^ f
|
47
|
+
@coords = coords_priv
|
48
|
+
end
|
49
|
+
|
50
|
+
# Setzt den Stein auf eine Position
|
51
|
+
def locate!(position)
|
52
|
+
@position = position
|
53
|
+
@coords = coords_priv
|
54
|
+
end
|
55
|
+
|
56
|
+
# Verschiebt den Stein
|
57
|
+
def move!(shift)
|
58
|
+
@position = position + shift
|
59
|
+
@coords = coords_priv
|
60
|
+
end
|
61
|
+
|
38
62
|
def ==(other)
|
39
63
|
color == other.color &&
|
40
|
-
|
41
|
-
rotation == other.rotation &&
|
42
|
-
is_flipped == other.is_flipped &&
|
43
|
-
position == other.position
|
64
|
+
coords == other.coords
|
44
65
|
end
|
45
66
|
|
46
67
|
def to_s
|
@@ -52,6 +73,7 @@ class Piece
|
|
52
73
|
end
|
53
74
|
|
54
75
|
private
|
76
|
+
|
55
77
|
def coords_priv
|
56
78
|
kind.transform(@rotation, @is_flipped).transform do |it|
|
57
79
|
Coordinates.new(it.x + @position.x, it.y + @position.y)
|
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
|
4
|
+
version: 21.1.0
|
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-
|
13
|
+
date: 2020-12-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: builder
|