mumuki-gobstones-runner 2.12.0 → 2.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets_server.rb +6 -2
- data/lib/game_framework/extra.gbs.erb +20 -0
- data/lib/public/local-media/repeticion-simple.png +0 -0
- data/lib/public/media/five.png +0 -0
- data/lib/public/media/four.png +0 -0
- data/lib/public/media/one.png +0 -0
- data/lib/public/media/three.png +0 -0
- data/lib/public/media/two.png +0 -0
- data/lib/public/minimal-kindergarten-toolbox.xml +0 -1
- data/lib/public/toolbox/kindergarten-2-to-3.xml +6 -0
- data/lib/public/toolbox/kindergarten-2-to-4.xml +7 -0
- data/lib/public/toolbox/kindergarten-2-to-5.xml +8 -0
- data/lib/public/toolbox/kindergarten-full.xml +5 -0
- data/lib/public/toolbox/kindergarten-minimal.xml +1 -0
- data/lib/render/editor/editor.css +4 -0
- data/lib/render/editor/editor.html.erb +17 -13
- data/lib/version_hook.rb +1 -1
- metadata +13 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45823ede62f0dab0aaecc19ed12332cfeae22a593c9809fb31f248b8d922f006
|
4
|
+
data.tar.gz: a16ec2877eadbbf19db14b57b62f6ee96222d41d8978634da9aa93ba8561fdd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d5749f67661dbf6d2d2f00f4f1bd48ab4ab86a1abda93e275e08916cd23ddc41eda5aa0498b4b7a76f760ee9d011f8dd8e1a4b592a68225138ef6680d3d640c
|
7
|
+
data.tar.gz: 3f61470fe0aa02a8f84723a37939147441fb1ace1e7c58be13ea5fc4d4fc79e5824993198d9b22986ee3559c062c0a931ad4d864b8b8f14f5bf937a3e2699649
|
data/lib/assets_server.rb
CHANGED
@@ -17,10 +17,10 @@ class Mumukit::Server::App < Sinatra::Base
|
|
17
17
|
get_local_asset "#{asset_type}/#{name}.svg", "lib/public/#{name}.svg", 'image/svg+xml'
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.get_media_assets(folder)
|
20
|
+
def self.get_media_assets(folder, content_type = nil)
|
21
21
|
Dir.glob(File.join(__dir__,"../lib/public/#{folder}/*")).each do |path|
|
22
22
|
relative_media_asset_path = "#{folder}/#{File.basename path}"
|
23
|
-
get_local_asset relative_media_asset_path, "lib/public/#{relative_media_asset_path}"
|
23
|
+
get_local_asset relative_media_asset_path, "lib/public/#{relative_media_asset_path}", content_type
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -38,9 +38,13 @@ class Mumukit::Server::App < Sinatra::Base
|
|
38
38
|
get_local_asset 'editor/editor.css', 'lib/render/editor/editor.css', 'text/css'
|
39
39
|
get_local_asset 'editor/hammer.min.js', 'lib/render/editor/hammer.min.js', 'application/javascript'
|
40
40
|
get_local_asset 'boom.png', 'lib/public/boom.png', 'image/png'
|
41
|
+
|
42
|
+
# Depracated, prefer toolbox path
|
41
43
|
get_local_asset 'full-kindergarten-toolbox.xml', 'lib/public/full-kindergarten-toolbox.xml', 'text/plain'
|
42
44
|
get_local_asset 'minimal-kindergarten-toolbox.xml', 'lib/public/minimal-kindergarten-toolbox.xml', 'text/plain'
|
43
45
|
|
46
|
+
get_media_assets 'toolbox', 'text/plain'
|
47
|
+
|
44
48
|
get_media_assets 'media'
|
45
49
|
get_media_assets 'local-media'
|
46
50
|
|
@@ -62,6 +62,26 @@ procedure ShiftDown() {
|
|
62
62
|
ShiftTo(Sur)
|
63
63
|
}
|
64
64
|
|
65
|
+
function one() {
|
66
|
+
return (1);
|
67
|
+
}
|
68
|
+
|
69
|
+
function two() {
|
70
|
+
return (2);
|
71
|
+
}
|
72
|
+
|
73
|
+
function three() {
|
74
|
+
return (3);
|
75
|
+
}
|
76
|
+
|
77
|
+
function four() {
|
78
|
+
return (4);
|
79
|
+
}
|
80
|
+
|
81
|
+
function five() {
|
82
|
+
return (5);
|
83
|
+
}
|
84
|
+
|
65
85
|
procedure ShiftTo(dir) {
|
66
86
|
if (puedeMover(dir)) {
|
67
87
|
Sacar(Rojo)
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<category name="Bloques de Gobstones">
|
2
|
+
<block type="RepeticionSimple"></block>
|
3
|
+
<block type="two"></block>
|
4
|
+
<block type="three"></block>
|
5
|
+
<block type="four"></block>
|
6
|
+
<block type="five"></block>
|
7
|
+
</category>
|
8
|
+
<category name="Procedimientos primitivos"></category>
|
@@ -0,0 +1 @@
|
|
1
|
+
<category name="Procedimientos primitivos"></category>
|
@@ -239,7 +239,7 @@
|
|
239
239
|
this._relocateTrash();
|
240
240
|
});
|
241
241
|
|
242
|
-
$(window).resize(() => this._relocateTrash
|
242
|
+
$(window).resize(() => setTimeout(this._relocateTrash));
|
243
243
|
},
|
244
244
|
|
245
245
|
|
@@ -301,8 +301,9 @@
|
|
301
301
|
}
|
302
302
|
|
303
303
|
const $blocklyTrash = $('.blocklyTrash');
|
304
|
-
const
|
305
|
-
const
|
304
|
+
const $blocklyDiv = $('#blocklyDiv');
|
305
|
+
const width = $blocklyDiv.width() - 68;
|
306
|
+
const height = $blocklyDiv.height() - 210;
|
306
307
|
$blocklyTrash.css("transform", `translate(${width}px, ${height}px)`);
|
307
308
|
$blocklyTrash.css("display", "unset");
|
308
309
|
},
|
@@ -427,11 +428,14 @@
|
|
427
428
|
console.debug("Set game actions");
|
428
429
|
const blockly = this._getBlockly();
|
429
430
|
|
430
|
-
this._setPrimitiveProcedures(
|
431
|
-
this.
|
432
|
-
|
433
|
-
|
434
|
-
|
431
|
+
this._setPrimitiveProcedures(
|
432
|
+
this._gamePrimitivesFor(blockly.primitiveProcedures, [
|
433
|
+
'ShiftUp', 'ShiftDown', 'ShiftLeft', 'ShiftRight'
|
434
|
+
]));
|
435
|
+
|
436
|
+
this._setPrimitiveFunctions(
|
437
|
+
this._gamePrimitivesFor(blockly.primitiveFunctions, [
|
438
|
+
'one', 'two', 'three', 'four', 'five'
|
435
439
|
]));
|
436
440
|
},
|
437
441
|
|
@@ -457,6 +461,10 @@
|
|
457
461
|
return { alias: 'procedureDeclaration', name, attributes: {block_icon: `<%= @assets_url %>/media/${name}.png`} };
|
458
462
|
},
|
459
463
|
|
464
|
+
_gamePrimitivesFor(base, names) {
|
465
|
+
return (base || []).concat(names.map(it => this._gamePrimitive(it)));
|
466
|
+
},
|
467
|
+
|
460
468
|
_getBlockly() {
|
461
469
|
return this.$.blocklyElement;
|
462
470
|
},
|
@@ -822,15 +830,11 @@
|
|
822
830
|
const targetStateIndex = this.multipleScenarios.currentScenarioIndex;
|
823
831
|
this.targetState = this.initialState[targetStateIndex];
|
824
832
|
|
825
|
-
const promise =
|
826
|
-
.runTests(solution)
|
833
|
+
const promise = mumuki.submission.processSolution({ solution })
|
827
834
|
.then((results) => {
|
828
835
|
if (promise !== this.serverPromise) return;
|
829
836
|
|
830
837
|
this._onRemoteExecutionStop(results);
|
831
|
-
})
|
832
|
-
.catch(() => {
|
833
|
-
mumuki.kids.showResult({status: 'aborted'})
|
834
838
|
});
|
835
839
|
this.serverPromise = promise;
|
836
840
|
|
data/lib/version_hook.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-gobstones-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Alfonso
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-01-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gobstones-board
|
@@ -240,12 +240,22 @@ files:
|
|
240
240
|
- lib/public/media/disconnect.mp3
|
241
241
|
- lib/public/media/disconnect.ogg
|
242
242
|
- lib/public/media/disconnect.wav
|
243
|
+
- lib/public/media/five.png
|
244
|
+
- lib/public/media/four.png
|
245
|
+
- lib/public/media/one.png
|
243
246
|
- lib/public/media/quote0.png
|
244
247
|
- lib/public/media/quote1.png
|
245
248
|
- lib/public/media/sprites.png
|
246
249
|
- lib/public/media/sprites.svg
|
250
|
+
- lib/public/media/three.png
|
251
|
+
- lib/public/media/two.png
|
247
252
|
- lib/public/minimal-kindergarten-toolbox.xml
|
248
253
|
- lib/public/red.svg
|
254
|
+
- lib/public/toolbox/kindergarten-2-to-3.xml
|
255
|
+
- lib/public/toolbox/kindergarten-2-to-4.xml
|
256
|
+
- lib/public/toolbox/kindergarten-2-to-5.xml
|
257
|
+
- lib/public/toolbox/kindergarten-full.xml
|
258
|
+
- lib/public/toolbox/kindergarten-minimal.xml
|
249
259
|
- lib/render/boards.html.erb
|
250
260
|
- lib/render/editor/editor.css
|
251
261
|
- lib/render/editor/editor.html.erb
|
@@ -276,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
276
286
|
- !ruby/object:Gem::Version
|
277
287
|
version: '0'
|
278
288
|
requirements: []
|
279
|
-
rubygems_version: 3.0.
|
289
|
+
rubygems_version: 3.0.3
|
280
290
|
signing_key:
|
281
291
|
specification_version: 4
|
282
292
|
summary: Gobstones Runner for Mumuki
|