software_challenge_client 21.2.0 → 22.1.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 +4 -4
- data/.gitignore +4 -1
- data/Dockerfile +1 -1
- data/README.md +1 -1
- data/RELEASES.md +8 -0
- data/bin/console +0 -0
- data/bin/setup +0 -0
- data/develop.sh +0 -0
- data/example/main.rb +0 -0
- data/example/start.bat +0 -0
- data/generate-authors.sh +0 -0
- data/lib/software_challenge_client/board.rb +11 -61
- data/lib/software_challenge_client/color.rb +13 -3
- data/lib/software_challenge_client/field.rb +30 -11
- data/lib/software_challenge_client/game_rule_logic.rb +61 -254
- data/lib/software_challenge_client/game_state.rb +153 -232
- data/lib/software_challenge_client/move.rb +41 -0
- data/lib/software_challenge_client/piece.rb +55 -63
- data/lib/software_challenge_client/piece_type.rb +16 -0
- data/lib/software_challenge_client/player.rb +12 -6
- data/lib/software_challenge_client/protocol.rb +201 -266
- data/lib/software_challenge_client/runner.rb +1 -1
- data/lib/software_challenge_client/team.rb +25 -0
- data/lib/software_challenge_client/util/constants.rb +2 -3
- data/lib/software_challenge_client/version.rb +1 -1
- data/lib/software_challenge_client.rb +3 -6
- data/lib/update_client_module.sh +0 -0
- data/push_image_production.sh +12 -0
- data/release.sh +0 -0
- metadata +7 -10
- data/lib/software_challenge_client/coordinate_set.rb +0 -92
- data/lib/software_challenge_client/piece_shape.rb +0 -109
- data/lib/software_challenge_client/player_type.rb +0 -14
- data/lib/software_challenge_client/rotation.rb +0 -22
- data/lib/software_challenge_client/set_move.rb +0 -24
- data/lib/software_challenge_client/skip_move.rb +0 -13
@@ -1,266 +1,201 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
# frozen_string_literal: true
|
3
|
-
require 'socket'
|
4
|
-
require_relative 'board'
|
5
|
-
require_relative '
|
6
|
-
require_relative '
|
7
|
-
require_relative 'player'
|
8
|
-
require_relative 'network'
|
9
|
-
require_relative 'client_interface'
|
10
|
-
require 'rexml/document'
|
11
|
-
require 'rexml/streamlistener'
|
12
|
-
require 'builder'
|
13
|
-
|
14
|
-
# This class handles communication to the server over the XML communication
|
15
|
-
# protocol. Messages from the server are parsed and moves are serialized and
|
16
|
-
# send back.
|
17
|
-
class Protocol
|
18
|
-
include Logging
|
19
|
-
include REXML::StreamListener
|
20
|
-
|
21
|
-
# @!attribute [r] gamestate
|
22
|
-
# @return [Gamestate] current gamestate
|
23
|
-
attr_reader :gamestate
|
24
|
-
# @!attribute [rw] roomId
|
25
|
-
# @return [String] current room id
|
26
|
-
attr_accessor :roomId
|
27
|
-
# @!attribute [r] client
|
28
|
-
# @return [ClientInterface] current client
|
29
|
-
attr_reader :client
|
30
|
-
|
31
|
-
def initialize(network, client)
|
32
|
-
@gamestate = GameState.new
|
33
|
-
@network = network
|
34
|
-
@client = client
|
35
|
-
@context = {} # for saving context when stream-parsing the XML
|
36
|
-
@client.gamestate = @gamestate
|
37
|
-
end
|
38
|
-
|
39
|
-
# starts xml-string parsing
|
40
|
-
#
|
41
|
-
# @param text [String] the xml-string that will be parsed
|
42
|
-
def process_string(text)
|
43
|
-
#logger.debug "Parse XML:\n#{text}\n----END XML"
|
44
|
-
begin
|
45
|
-
REXML::Document.parse_stream(text, self)
|
46
|
-
rescue REXML::ParseException => e
|
47
|
-
# to parse incomplete xml, ignore missing end tag exceptions
|
48
|
-
raise e unless e.message =~ /Missing end tag/
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
# called when text is encountered
|
53
|
-
def text(text)
|
54
|
-
@context[:last_text] = text
|
55
|
-
end
|
56
|
-
|
57
|
-
# called if an end-tag is read
|
58
|
-
#
|
59
|
-
# @param name [String] the end-tag name, that was read
|
60
|
-
def tag_end(name)
|
61
|
-
case name
|
62
|
-
when 'board'
|
63
|
-
logger.debug @gamestate.board.to_s
|
64
|
-
when '
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
@gamestate.
|
78
|
-
|
79
|
-
|
80
|
-
@gamestate.
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
when '
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
logger.debug
|
118
|
-
|
119
|
-
|
120
|
-
@gamestate.
|
121
|
-
|
122
|
-
|
123
|
-
when '
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
@context[:
|
128
|
-
@context[:
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
@
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
@
|
141
|
-
when '
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
@
|
149
|
-
when '
|
150
|
-
|
151
|
-
@
|
152
|
-
when '
|
153
|
-
|
154
|
-
@
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
# @gamestate.condition = Condition.new(winning_player, @gamestate.condition.reason)
|
203
|
-
when 'score'
|
204
|
-
# TODO
|
205
|
-
# there are two score tags in the result, but reason attribute should be equal on both
|
206
|
-
# @gamestate.condition = Condition.new(@gamestate.condition.winner, attrs['reason'])
|
207
|
-
when 'left'
|
208
|
-
logger.debug 'got left event, terminating'
|
209
|
-
@network.disconnect
|
210
|
-
when 'sc.protocol.responses.CloseConnection'
|
211
|
-
logger.debug 'got left close connection event, terminating'
|
212
|
-
@network.disconnect
|
213
|
-
end
|
214
|
-
end
|
215
|
-
|
216
|
-
# send a xml document
|
217
|
-
#
|
218
|
-
# @param document [REXML::Document] the document, that will be send to the connected server
|
219
|
-
def sendXml(document)
|
220
|
-
@network.sendXML(document)
|
221
|
-
end
|
222
|
-
|
223
|
-
# send a string
|
224
|
-
#
|
225
|
-
# @param string [String] The string that will be send to the connected server.
|
226
|
-
def sendString(string)
|
227
|
-
@network.sendString("<room roomId=\"#{@roomId}\">#{string}</room>")
|
228
|
-
end
|
229
|
-
|
230
|
-
# converts "this_snake_case" to "thisSnakeCase"
|
231
|
-
def snake_case_to_lower_camel_case(string)
|
232
|
-
string.split('_').inject([]) do |result, e|
|
233
|
-
result + [result.empty? ? e : e.capitalize]
|
234
|
-
end.join
|
235
|
-
end
|
236
|
-
|
237
|
-
# Converts a move to XML for sending to the server.
|
238
|
-
#
|
239
|
-
# @param move [Move] The move to convert to XML.
|
240
|
-
def move_to_xml(move)
|
241
|
-
builder = Builder::XmlMarkup.new(indent: 2)
|
242
|
-
# Converting every the move here instead of requiring the Move
|
243
|
-
# class interface to supply a method which returns the XML
|
244
|
-
# because XML-generation should be decoupled from internal data
|
245
|
-
# structures.
|
246
|
-
case move
|
247
|
-
when SetMove
|
248
|
-
builder.data(class: 'sc.plugin2021.SetMove') do |data|
|
249
|
-
data.piece(color: move.piece.color, kind: move.piece.kind, rotation: move.piece.rotation, isFlipped: move.piece.is_flipped) do |piece|
|
250
|
-
piece.position(x: move.piece.position.x, y: move.piece.position.y)
|
251
|
-
end
|
252
|
-
move.hints.each do |hint|
|
253
|
-
data.hint(content: hint.content)
|
254
|
-
end
|
255
|
-
end
|
256
|
-
when SkipMove
|
257
|
-
builder.data(class: 'sc.plugin2021.SkipMove') do |data|
|
258
|
-
data.color(@gamestate.current_color.key.to_s)
|
259
|
-
move.hints.each do |hint|
|
260
|
-
data.hint(content: hint.content)
|
261
|
-
end
|
262
|
-
end
|
263
|
-
end
|
264
|
-
builder.target!
|
265
|
-
end
|
266
|
-
end
|
1
|
+
# encoding: UTF-8
|
2
|
+
# frozen_string_literal: true
|
3
|
+
require 'socket'
|
4
|
+
require_relative 'board'
|
5
|
+
require_relative 'move'
|
6
|
+
require_relative 'piece_type'
|
7
|
+
require_relative 'player'
|
8
|
+
require_relative 'network'
|
9
|
+
require_relative 'client_interface'
|
10
|
+
require 'rexml/document'
|
11
|
+
require 'rexml/streamlistener'
|
12
|
+
require 'builder'
|
13
|
+
|
14
|
+
# This class handles communication to the server over the XML communication
|
15
|
+
# protocol. Messages from the server are parsed and moves are serialized and
|
16
|
+
# send back.
|
17
|
+
class Protocol
|
18
|
+
include Logging
|
19
|
+
include REXML::StreamListener
|
20
|
+
|
21
|
+
# @!attribute [r] gamestate
|
22
|
+
# @return [Gamestate] current gamestate
|
23
|
+
attr_reader :gamestate
|
24
|
+
# @!attribute [rw] roomId
|
25
|
+
# @return [String] current room id
|
26
|
+
attr_accessor :roomId
|
27
|
+
# @!attribute [r] client
|
28
|
+
# @return [ClientInterface] current client
|
29
|
+
attr_reader :client
|
30
|
+
|
31
|
+
def initialize(network, client)
|
32
|
+
@gamestate = GameState.new
|
33
|
+
@network = network
|
34
|
+
@client = client
|
35
|
+
@context = {} # for saving context when stream-parsing the XML
|
36
|
+
@client.gamestate = @gamestate
|
37
|
+
end
|
38
|
+
|
39
|
+
# starts xml-string parsing
|
40
|
+
#
|
41
|
+
# @param text [String] the xml-string that will be parsed
|
42
|
+
def process_string(text)
|
43
|
+
#logger.debug "Parse XML:\n#{text}\n----END XML"
|
44
|
+
begin
|
45
|
+
REXML::Document.parse_stream(text, self)
|
46
|
+
rescue REXML::ParseException => e
|
47
|
+
# to parse incomplete xml, ignore missing end tag exceptions
|
48
|
+
raise e unless e.message =~ /Missing end tag/
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# called when text is encountered
|
53
|
+
def text(text)
|
54
|
+
@context[:last_text] = text
|
55
|
+
end
|
56
|
+
|
57
|
+
# called if an end-tag is read
|
58
|
+
#
|
59
|
+
# @param name [String] the end-tag name, that was read
|
60
|
+
def tag_end(name)
|
61
|
+
case name
|
62
|
+
when 'board'
|
63
|
+
logger.debug @gamestate.board.to_s
|
64
|
+
when 'startTeam'
|
65
|
+
@gamestate.add_player(Player.new(Color::RED, "ONE", 0))
|
66
|
+
@gamestate.add_player(Player.new(Color::BLUE, "TWO", 0))
|
67
|
+
if @context[:last_text] == "ONE"
|
68
|
+
@gamestate.start_team = @gamestate.player_one
|
69
|
+
else
|
70
|
+
@gamestate.start_team = @gamestate.player_two
|
71
|
+
end
|
72
|
+
when 'team'
|
73
|
+
@context[:team] = @context[:last_text]
|
74
|
+
when 'int'
|
75
|
+
if @context[:team] == "ONE"
|
76
|
+
logger.info 'Got player one amber'
|
77
|
+
@gamestate.player_one.amber = @context[:last_text].to_i
|
78
|
+
else
|
79
|
+
logger.info 'Got player two amber'
|
80
|
+
@gamestate.player_two.amber = @context[:last_text].to_i
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# called if a start tag is read
|
86
|
+
# Depending on the tag the gamestate is updated
|
87
|
+
# or the client will be asked for a move
|
88
|
+
#
|
89
|
+
# @param name [String] the start-tag, that was read
|
90
|
+
# @param attrs [Dictionary<String, String>] Attributes attached to the tag
|
91
|
+
def tag_start(name, attrs)
|
92
|
+
case name
|
93
|
+
when 'room'
|
94
|
+
@roomId = attrs['roomId']
|
95
|
+
logger.info 'roomId : ' + @roomId
|
96
|
+
when 'data'
|
97
|
+
logger.debug "data(class) : #{attrs['class']}"
|
98
|
+
@context[:data_class] = attrs['class']
|
99
|
+
if attrs['class'] == 'moveRequest'
|
100
|
+
@client.gamestate = gamestate
|
101
|
+
move = @client.move_requested
|
102
|
+
sendString(move_to_xml(move))
|
103
|
+
end
|
104
|
+
if attrs['class'] == 'error'
|
105
|
+
logger.info "Game ended - ERROR: #{attrs['message']}"
|
106
|
+
@network.disconnect
|
107
|
+
end
|
108
|
+
if attrs['class'] == 'result'
|
109
|
+
logger.info 'Got game result'
|
110
|
+
@network.disconnect
|
111
|
+
@gamestate.condition = Condition.new(nil, '')
|
112
|
+
end
|
113
|
+
when 'state'
|
114
|
+
logger.debug 'new gamestate'
|
115
|
+
@gamestate = GameState.new
|
116
|
+
@gamestate.turn = attrs['turn'].to_i
|
117
|
+
logger.debug "Round: #{@gamestate.round}, Turn: #{@gamestate.turn}"
|
118
|
+
when 'board'
|
119
|
+
logger.debug 'new board'
|
120
|
+
@gamestate.board = Board.new()
|
121
|
+
when 'pieces'
|
122
|
+
@context[:entry] = :pieces
|
123
|
+
when 'coordinates'
|
124
|
+
@context[:x] = attrs['x'].to_i
|
125
|
+
@context[:y] = attrs['y'].to_i
|
126
|
+
when 'piece'
|
127
|
+
x = @context[:x]
|
128
|
+
y = @context[:y]
|
129
|
+
team = Team.find_by_key(attrs['team'].to_sym)
|
130
|
+
type = PieceType.find_by_key(attrs['type'].to_sym)
|
131
|
+
count = attrs['count'].to_i
|
132
|
+
field = Field.new(x, y, Piece.new(team.to_c, type, Coordinates.new(x, y), count))
|
133
|
+
@gamestate.board.add_field(field)
|
134
|
+
when 'from'
|
135
|
+
@context[:from] = Coordinates.new(attrs['x'].to_i, attrs['y'].to_i)
|
136
|
+
when 'to'
|
137
|
+
from = @context[:from]
|
138
|
+
@gamestate.last_move = Move.new(Coordinates.new(from.x, from.y), Coordinates.new(attrs['x'].to_i, attrs['y'].to_i))
|
139
|
+
when 'ambers'
|
140
|
+
@context[:entry] = :ambers
|
141
|
+
when 'winner'
|
142
|
+
# TODO
|
143
|
+
# winning_player = parsePlayer(attrs)
|
144
|
+
# @gamestate.condition = Condition.new(winning_player, @gamestate.condition.reason)
|
145
|
+
when 'score'
|
146
|
+
# TODO
|
147
|
+
# there are two score tags in the result, but reason attribute should be equal on both
|
148
|
+
# @gamestate.condition = Condition.new(@gamestate.condition.winner, attrs['reason'])
|
149
|
+
when 'left'
|
150
|
+
logger.debug 'got left event, terminating'
|
151
|
+
@network.disconnect
|
152
|
+
when 'sc.protocol.responses.CloseConnection'
|
153
|
+
logger.debug 'got left close connection event, terminating'
|
154
|
+
@network.disconnect
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# send a xml document
|
159
|
+
#
|
160
|
+
# @param document [REXML::Document] the document, that will be send to the connected server
|
161
|
+
def sendXml(document)
|
162
|
+
@network.sendXML(document)
|
163
|
+
end
|
164
|
+
|
165
|
+
# send a string
|
166
|
+
#
|
167
|
+
# @param string [String] The string that will be send to the connected server.
|
168
|
+
def sendString(string)
|
169
|
+
@network.sendString("<room roomId=\"#{@roomId}\">#{string}</room>")
|
170
|
+
end
|
171
|
+
|
172
|
+
# converts "this_snake_case" to "thisSnakeCase"
|
173
|
+
def snake_case_to_lower_camel_case(string)
|
174
|
+
string.split('_').inject([]) do |result, e|
|
175
|
+
result + [result.empty? ? e : e.capitalize]
|
176
|
+
end.join
|
177
|
+
end
|
178
|
+
|
179
|
+
# Converts a move to XML for sending to the server.
|
180
|
+
#
|
181
|
+
# @param move [Move] The move to convert to XML.
|
182
|
+
def move_to_xml(move)
|
183
|
+
builder = Builder::XmlMarkup.new(indent: 2)
|
184
|
+
|
185
|
+
if move.nil?
|
186
|
+
raise 'nil moves are not sendable!'
|
187
|
+
end
|
188
|
+
|
189
|
+
# Converting every the move here instead of requiring the Move
|
190
|
+
# class interface to supply a method which returns the XML
|
191
|
+
# because XML-generation should be decoupled from internal data
|
192
|
+
# structures.
|
193
|
+
|
194
|
+
builder.data(class: 'move') do |d|
|
195
|
+
d.from(x: move.from.x, y: move.from.y)
|
196
|
+
d.to(x: move.to.x, y: move.to.y)
|
197
|
+
end
|
198
|
+
|
199
|
+
builder.target!
|
200
|
+
end
|
201
|
+
end
|
@@ -9,7 +9,7 @@ class Runner
|
|
9
9
|
include Logging
|
10
10
|
|
11
11
|
def initialize(host, port, client, reservation = nil)
|
12
|
-
logger.info 'Software Challenge
|
12
|
+
logger.info 'Software Challenge 2022'
|
13
13
|
logger.info 'Ruby Client'
|
14
14
|
logger.info "Host: #{host}"
|
15
15
|
logger.info "Port: #{port}"
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'typesafe_enum'
|
4
|
+
|
5
|
+
require_relative 'color'
|
6
|
+
|
7
|
+
# Erster oder zweiter Spieler:
|
8
|
+
#
|
9
|
+
# ONE
|
10
|
+
# TWO
|
11
|
+
#
|
12
|
+
# Zugriff z.B. mit Team::ONE
|
13
|
+
class Team < TypesafeEnum::Base
|
14
|
+
new :ONE, 'Red'
|
15
|
+
new :TWO, 'Blue'
|
16
|
+
|
17
|
+
# @return [Color] Gibt die zugehörige Farbe zurück
|
18
|
+
def to_c
|
19
|
+
if self.key == :ONE
|
20
|
+
Color::RED
|
21
|
+
else
|
22
|
+
Color::BLUE
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -4,7 +4,6 @@
|
|
4
4
|
# Konstanten zum aktuellen Spiel.
|
5
5
|
module Constants
|
6
6
|
ROUND_LIMIT = 30 # Rundenbegrenzung. Nach Ende der angegebenen Runde endet auch das Spiel.
|
7
|
-
GAME_IDENTIFIER = '
|
8
|
-
BOARD_SIZE =
|
9
|
-
TOTAL_PIECE_SHAPES = 21
|
7
|
+
GAME_IDENTIFIER = 'swc_2022_ostseeschach' # Der Identifikator des Spiels. Für die Kommunikation mit dem Spielserver.
|
8
|
+
BOARD_SIZE = 8 # Seitenlänge des Spielbretts in Feldern
|
10
9
|
end
|
@@ -4,7 +4,6 @@ module SoftwareChallengeClient
|
|
4
4
|
require 'software_challenge_client/client_interface.rb'
|
5
5
|
require 'software_challenge_client/color.rb'
|
6
6
|
require 'software_challenge_client/condition.rb'
|
7
|
-
require 'software_challenge_client/coordinate_set.rb'
|
8
7
|
require 'software_challenge_client/coordinates.rb'
|
9
8
|
require 'software_challenge_client/debug_hint.rb'
|
10
9
|
require 'software_challenge_client/field.rb'
|
@@ -13,16 +12,14 @@ module SoftwareChallengeClient
|
|
13
12
|
require 'software_challenge_client/has_hints.rb'
|
14
13
|
require 'software_challenge_client/invalid_move_exception.rb'
|
15
14
|
require 'software_challenge_client/logging.rb'
|
15
|
+
require 'software_challenge_client/move.rb'
|
16
16
|
require 'software_challenge_client/network.rb'
|
17
17
|
require 'software_challenge_client/piece.rb'
|
18
|
-
require 'software_challenge_client/
|
18
|
+
require 'software_challenge_client/piece_type.rb'
|
19
19
|
require 'software_challenge_client/player.rb'
|
20
|
-
require 'software_challenge_client/player_type.rb'
|
21
20
|
require 'software_challenge_client/protocol.rb'
|
22
|
-
require 'software_challenge_client/rotation.rb'
|
23
21
|
require 'software_challenge_client/runner.rb'
|
24
|
-
require 'software_challenge_client/
|
25
|
-
require 'software_challenge_client/skip_move.rb'
|
22
|
+
require 'software_challenge_client/team.rb'
|
26
23
|
require 'software_challenge_client/util/constants.rb'
|
27
24
|
require 'software_challenge_client/version.rb'
|
28
25
|
end
|
data/lib/update_client_module.sh
CHANGED
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
server=flut
|
4
|
+
docker build . -t sc-ruby
|
5
|
+
docker tag sc-ruby localhost:5000/sc-ruby
|
6
|
+
ssh -M -S ssh-ctrl-socket -fnNT -L 5000:localhost:5000 $server
|
7
|
+
ssh -S ssh-ctrl-socket -O check $server || exit 1
|
8
|
+
docker login localhost:5000 || exit 1
|
9
|
+
docker push localhost:5000/sc-ruby
|
10
|
+
ssh -S ssh-ctrl-socket -O exit $server
|
11
|
+
ssh $server 'sudo docker pull localhost:5000/sc-ruby'
|
12
|
+
ssh $server 'sudo docker tag localhost:5000/sc-ruby sc-ruby'
|
data/release.sh
CHANGED
File without changes
|
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:
|
4
|
+
version: 22.1.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:
|
13
|
+
date: 2022-02-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: builder
|
@@ -286,7 +286,6 @@ files:
|
|
286
286
|
- lib/software_challenge_client/client_interface.rb
|
287
287
|
- lib/software_challenge_client/color.rb
|
288
288
|
- lib/software_challenge_client/condition.rb
|
289
|
-
- lib/software_challenge_client/coordinate_set.rb
|
290
289
|
- lib/software_challenge_client/coordinates.rb
|
291
290
|
- lib/software_challenge_client/debug_hint.rb
|
292
291
|
- lib/software_challenge_client/field.rb
|
@@ -295,19 +294,18 @@ files:
|
|
295
294
|
- lib/software_challenge_client/has_hints.rb
|
296
295
|
- lib/software_challenge_client/invalid_move_exception.rb
|
297
296
|
- lib/software_challenge_client/logging.rb
|
297
|
+
- lib/software_challenge_client/move.rb
|
298
298
|
- lib/software_challenge_client/network.rb
|
299
299
|
- lib/software_challenge_client/piece.rb
|
300
|
-
- lib/software_challenge_client/
|
300
|
+
- lib/software_challenge_client/piece_type.rb
|
301
301
|
- lib/software_challenge_client/player.rb
|
302
|
-
- lib/software_challenge_client/player_type.rb
|
303
302
|
- lib/software_challenge_client/protocol.rb
|
304
|
-
- lib/software_challenge_client/rotation.rb
|
305
303
|
- lib/software_challenge_client/runner.rb
|
306
|
-
- lib/software_challenge_client/
|
307
|
-
- lib/software_challenge_client/skip_move.rb
|
304
|
+
- lib/software_challenge_client/team.rb
|
308
305
|
- lib/software_challenge_client/util/constants.rb
|
309
306
|
- lib/software_challenge_client/version.rb
|
310
307
|
- lib/update_client_module.sh
|
308
|
+
- push_image_production.sh
|
311
309
|
- release.sh
|
312
310
|
- software_challenge_client.gemspec
|
313
311
|
homepage: http://www.software-challenge.de
|
@@ -328,8 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
328
326
|
- !ruby/object:Gem::Version
|
329
327
|
version: '0'
|
330
328
|
requirements: []
|
331
|
-
|
332
|
-
rubygems_version: 2.7.6.2
|
329
|
+
rubygems_version: 3.1.6
|
333
330
|
signing_key:
|
334
331
|
specification_version: 4
|
335
332
|
summary: Provides functions to build a client for the coding competition Software-Challenge
|