mumuki-gobstones-runner 2.13.0 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ba04506c9ef79dfcf3e5c4a080e1f147c87134f939afe70aa5f54e515640c51
4
- data.tar.gz: 4fa2cae67f9e144499c8acc8eff28b3af3a4176a47df91b49085b2f3a9901d34
3
+ metadata.gz: d1e37b379d7f5b9d1741c5e284a8fb194bf7cf4e98d8ebe0d5560f8c18f550f3
4
+ data.tar.gz: f4db093fd3129f3427244acbcc5b5848044471bd917c1313d0c074e0adaf04cf
5
5
  SHA512:
6
- metadata.gz: fd96ca8f78913c83581b165f73cf2f31b84b307c0dd7db599c2852aa9c794c7593b851595dd91aeadb0cbe9f515d4f93ca76c18c80db1f6444ae89aa8e40b396
7
- data.tar.gz: dd57c527fe5915e0f2218dd3b152e850cb6a6c9a256877d16ccd252da48d8603b665bbfe1b5a459d66c9ed9b45a49751264f22f20f76bbcbc39aa14db8bb4cb7
6
+ metadata.gz: dfbe216007c99bc8cd60aac82a806dbdfed12a4b4a9384de32de8d0b3718151d289e77ab9c895d1e1da621419dc9bdf720e766d6289d8f83357af8be1177bdd3
7
+ data.tar.gz: 149eaa77b7069cf2f0af824afee3af05480d7d7e3a6dd36d1a31f4d90a7ea3fa377c70995b56b40dddcce119c9bc689139f3befe5ccb81a4748708d988440483
@@ -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
@@ -1,2 +1 @@
1
1
  <category name="Procedimientos primitivos"></category>
2
- <category name="Funciones primitivas"></category>
@@ -0,0 +1,6 @@
1
+ <category name="Bloques de Gobstones">
2
+ <block type="RepeticionSimple"></block>
3
+ <block type="two"></block>
4
+ <block type="three"></block>
5
+ </category>
6
+ <category name="Procedimientos primitivos"></category>
@@ -0,0 +1,7 @@
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
+ </category>
7
+ <category name="Procedimientos primitivos"></category>
@@ -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,5 @@
1
+ <category name="Bloques de Gobstones">
2
+ <block type="RepeticionSimple"></block>
3
+ </category>
4
+ <category name="Funciones primitivas"></category>
5
+ <category name="Procedimientos primitivos"></category>
@@ -0,0 +1 @@
1
+ <category name="Procedimientos primitivos"></category>
@@ -428,11 +428,14 @@
428
428
  console.debug("Set game actions");
429
429
  const blockly = this._getBlockly();
430
430
 
431
- this._setPrimitiveProcedures((blockly.primitiveProcedures || []).concat([
432
- this._gamePrimitive('ShiftUp'),
433
- this._gamePrimitive('ShiftDown'),
434
- this._gamePrimitive('ShiftLeft'),
435
- this._gamePrimitive('ShiftRight')
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'
436
439
  ]));
437
440
  },
438
441
 
@@ -458,6 +461,10 @@
458
461
  return { alias: 'procedureDeclaration', name, attributes: {block_icon: `<%= @assets_url %>/media/${name}.png`} };
459
462
  },
460
463
 
464
+ _gamePrimitivesFor(base, names) {
465
+ return (base || []).concat(names.map(it => this._gamePrimitive(it)));
466
+ },
467
+
461
468
  _getBlockly() {
462
469
  return this.$.blocklyElement;
463
470
  },
@@ -1,3 +1,3 @@
1
1
  module GobstonesVersionHook
2
- VERSION = '2.13.0'
2
+ VERSION = '2.14.0'
3
3
  end
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.13.0
4
+ version: 2.14.0
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: 2020-12-02 00:00:00.000000000 Z
12
+ date: 2020-12-11 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.6
289
+ rubygems_version: 3.0.3
280
290
  signing_key:
281
291
  specification_version: 4
282
292
  summary: Gobstones Runner for Mumuki