smalruby-editor 0.2.1-x86-mingw32 → 0.2.2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of smalruby-editor might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/LEGAL +4 -3
- data/app/assets/javascripts/blocks/character.js.coffee.erb +7 -3
- data/app/assets/javascripts/blocks/events.js.coffee.erb +7 -10
- data/app/assets/javascripts/blocks/hardware.js.coffee.erb +119 -31
- data/app/assets/javascripts/blocks/motion.js.coffee.erb +16 -20
- data/app/assets/javascripts/blocks/operators.js.coffee.erb +1 -1
- data/app/assets/javascripts/blocks/pen.js.coffee.erb +2 -1
- data/app/assets/javascripts/blocks/ruby.js.coffee.erb +3 -3
- data/app/assets/javascripts/blocks/sensing.js.coffee.erb +8 -8
- data/app/assets/javascripts/blocks/sound.js.coffee.erb +3 -1
- data/app/assets/javascripts/fix_blockly.js.erb +105 -0
- data/app/assets/javascripts/generators/ruby.js.coffee.erb +3 -0
- data/app/assets/javascripts/msg/en_us.js +67 -17
- data/app/assets/javascripts/msg/ja.js +151 -95
- data/app/assets/javascripts/{smalruby.js.coffee → smalruby.js.coffee.erb} +35 -16
- data/app/assets/javascripts/views/character_selector_view.js.coffee +2 -2
- data/app/assets/javascripts/views/{load_modal_view.js.coffee → load_modal_view.js.coffee.erb} +8 -2
- data/app/assets/javascripts/views/main_menu_view.js.coffee.erb +33 -48
- data/app/assets/javascripts/views/signin_modal_view.js.coffee.erb +43 -0
- data/app/assets/stylesheets/application.css +3 -1
- data/app/assets/stylesheets/toolbox.css.scss.erb +2 -56
- data/app/assets/stylesheets/toolbox_default.css.scss.erb +34 -0
- data/app/assets/stylesheets/toolbox_smalrubot_s1.css.scss.erb +31 -0
- data/app/assets/stylesheets/toolbox_smalrubot_v3.css.scss.erb +32 -0
- data/app/controllers/application_controller.rb +5 -0
- data/app/controllers/source_codes_controller.rb +6 -3
- data/app/helpers/application_helper.rb +12 -0
- data/app/helpers/editor_helper.rb +25 -0
- data/app/models/concerns/ruby_to_block/block/hardware_smalrubot_s1_action.rb +13 -0
- data/app/models/concerns/ruby_to_block/block/hardware_smalrubot_s1_action_with_sec.rb +14 -0
- data/app/models/concerns/ruby_to_block/block/hardware_smalrubot_s1_ir_photoreflector_value.rb +29 -0
- data/app/models/concerns/ruby_to_block/block/hardware_smalrubot_s1_led_turn_on_or_off.rb +22 -0
- data/app/views/editor/_block_tab.html.haml +7 -6
- data/app/views/editor/_reset_modal.html.haml +4 -4
- data/app/views/editor/_signin_modal.html.haml +8 -9
- data/app/views/editor/_toolbox_default.html.haml +504 -0
- data/app/views/editor/_toolbox_smalrubot_s1.html.haml +171 -0
- data/app/views/editor/_toolbox_smalrubot_v3.html.haml +177 -0
- data/app/views/editor/index.html.haml +12 -2
- data/app/views/layouts/application.html.erb +1 -0
- data/config/environments/production.rb +1 -0
- data/config/locales/en.yml +19 -16
- data/config/locales/ja.yml +28 -25
- data/demos/hardware_led.rb.xml +79 -79
- data/lib/smalruby_editor/config.rb +22 -0
- data/lib/smalruby_editor/version.rb +1 -1
- data/lib/smalruby_editor.rb +58 -0
- data/public/assets/application-71c4890fe0ea2e896fc0acff41cdb0ad.js +39 -0
- data/public/assets/application-71c4890fe0ea2e896fc0acff41cdb0ad.js.gz +0 -0
- data/public/assets/{application-d5358d75a2c4e570c749b333c59b55ab.css → application-c196e243630d74071981a16041bf391d.css} +1 -1
- data/public/assets/application-c196e243630d74071981a16041bf391d.css.gz +0 -0
- data/public/assets/blockly/msg/js/en_us-d5e1938b2d57c1df954f4411b9165d10.js +1 -0
- data/public/assets/blockly/msg/js/en_us-d5e1938b2d57c1df954f4411b9165d10.js.gz +0 -0
- data/public/assets/blockly/msg/js/ja-9f676d46458a2802b8f5a797c90ae8a4.js +1 -0
- data/public/assets/blockly/msg/js/ja-9f676d46458a2802b8f5a797c90ae8a4.js.gz +0 -0
- data/public/assets/manifest-f3d29c6d66b959abe4294a899733e4f0.json +1 -0
- data/public/assets/msg/en_us-213fb4a57884078038725a2991776f47.js +1 -0
- data/public/assets/msg/en_us-213fb4a57884078038725a2991776f47.js.gz +0 -0
- data/public/assets/msg/ja-aeface7456b479021e977a0387204036.js +1 -0
- data/public/assets/msg/ja-aeface7456b479021e977a0387204036.js.gz +0 -0
- data/public/assets/toolbox_default-e023d3f7a2cc7cc1f54a1224577b3c26.css +1 -0
- data/public/assets/toolbox_default-e023d3f7a2cc7cc1f54a1224577b3c26.css.gz +0 -0
- data/public/assets/toolbox_smalrubot_s1-18d28dc4b99723b60a3f538b742027df.css +1 -0
- data/public/assets/toolbox_smalrubot_s1-18d28dc4b99723b60a3f538b742027df.css.gz +0 -0
- data/public/assets/toolbox_smalrubot_v3-9af26ff13d4496890c4a391f65f95bcd.css +1 -0
- data/public/assets/toolbox_smalrubot_v3-9af26ff13d4496890c4a391f65f95bcd.css.gz +0 -0
- data/public/blockly/media/anon.jpeg +0 -0
- data/public/blockly/media/handclosed.cur +0 -0
- data/public/blockly/media/handdelete.cur +0 -0
- data/public/blockly/media/progress.gif +0 -0
- data/public/blockly/media/sprites.png +0 -0
- data/smalruby-editor.gemspec +2 -1
- data/spec/acceptance/base.feature +3 -3
- data/spec/acceptance/block_mode/blocks/hardware/smalrubot_s1_action.feature +107 -0
- data/spec/acceptance/block_mode/blocks/hardware/smalrubot_s1_action_with_sec.feature +151 -0
- data/spec/acceptance/block_mode/blocks/hardware/smalrubot_s1_ir_photoreflector_value.feature +100 -0
- data/spec/acceptance/block_mode/blocks/hardware/smalrubot_s1_led_turn_on_or_off.feature +73 -0
- data/spec/acceptance/ruby_mode/translate.feature +6 -6
- data/spec/acceptance/standalone/save.feature +3 -3
- data/spec/acceptance/standalone/signin.feature +1 -2
- data/spec/lib/smalruby_editor_spec.rb +21 -11
- data/spec/models/concerns/ruby_to_block/block/hardware__smalrubot_s1_spec.rb +279 -0
- data/vendor/assets/javascripts/blockly/blockly_compressed.js +995 -668
- data/vendor/assets/javascripts/blockly/blocks_compressed.js +138 -114
- data/vendor/assets/javascripts/blockly/msg/js/en_us.js +6 -6
- data/vendor/assets/javascripts/blockly/msg/js/ja.js +42 -28
- metadata +66 -25
- data/app/assets/javascripts/fix_blockly.js +0 -128
- data/app/assets/javascripts/views/signin_modal_view.js.coffee +0 -33
- data/app/views/editor/_toolbox.html.haml +0 -496
- data/public/assets/application-b305a6ea9e7c045a8e170bbf6fb09dd1.js +0 -35
- data/public/assets/application-b305a6ea9e7c045a8e170bbf6fb09dd1.js.gz +0 -0
- data/public/assets/application-d5358d75a2c4e570c749b333c59b55ab.css.gz +0 -0
- data/public/assets/blockly/msg/js/en_us-6f7333af29688596ef863fa36a22cb41.js +0 -1
- data/public/assets/blockly/msg/js/en_us-6f7333af29688596ef863fa36a22cb41.js.gz +0 -0
- data/public/assets/blockly/msg/js/ja-d2cbf808bda8180571bc5f39141a98fe.js +0 -1
- data/public/assets/blockly/msg/js/ja-d2cbf808bda8180571bc5f39141a98fe.js.gz +0 -0
- data/public/assets/manifest-b1b843b1334b3b973824ab66b1f7a077.json +0 -1
- data/public/assets/msg/en_us-c6f8f0084f38560bf933b742ede64a52.js +0 -1
- data/public/assets/msg/en_us-c6f8f0084f38560bf933b742ede64a52.js.gz +0 -0
- data/public/assets/msg/ja-3703e6ceebd04ae1f08b0e871800539d.js +0 -1
- data/public/assets/msg/ja-3703e6ceebd04ae1f08b0e871800539d.js.gz +0 -0
- data/public/blockly/media/trashbody.png +0 -0
- data/public/blockly/media/trashlid.png +0 -0
- data/public/blockly/media/tree.png +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
goog.provide("Blockly.Msg.ja.smalruby"),goog.require("Blockly.Msg"),Blockly.Msg.COMMON_TURN_ON="オンにする",Blockly.Msg.COMMON_TURN_OFF="オフにする",Blockly.Msg.COMMON_FORWARD="進める",Blockly.Msg.COMMON_BACKWARD="バックさせる",Blockly.Msg.COMMON_TURN_LEFT="左に曲げる",Blockly.Msg.COMMON_TURN_RIGHT="右に曲げる",Blockly.Msg.COMMON_STOP="止める",Blockly.Msg.COMMON_ERROR="エラー",Blockly.Msg.COLOUR_RED="赤色",Blockly.Msg.COLOUR_GREEN="緑色",Blockly.Msg.COLOUR_BLUE="青色",Blockly.Msg.COLOUR_WHITE="白色",Blockly.Msg.SMALRUBY_WILL_DISAPPER_YOUR_PROGRAM="作成中のプログラムが消えてしまうよ!",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_COMMON_LINES="行",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_COMMON_LETTERS="文字",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_COMMON_COMMA="、",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_COMMON_CONFIRM_OVERWRITE="前に{$filename}という名前でセーブしているけど本当にセーブしますか?\nセーブすると前に作成したプログラムは消えてしまうよ!",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_BLOCK_MODE_BLOCKUI_TITLE="プログラムの変換中",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_BLOCK_MODE_BLOCKUI_MESSAGE="プログラムをブロックに変換しています。",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_BLOCK_MODE_ERROR="ブロックへの変換に失敗しました",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_RUN_BLOCKUI_TITLE="プログラムの実行中",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_RUN_BLOCKUI_MESSAGE="プログラムの画面に切り替えてください。",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_RUN_BLOCKUI_NOTICE="プログラムをセーブ・チェックしてから実行するよ♪<br>Escキーを押すとプログラムが終わります。",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_RUN_ERROR_CANT_RUN="プログラムを実行できませんでした",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_RUN_ERROR_CANCEL_TO_RUN="プログラムの実行をキャンセルしました",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_DOWNLOAD_BLOCKUI_TITLE="プログラムのダウンロード中",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_DOWNLOAD_BLOCKUI_MESSAGE="プログラムをダウンロードしています。",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_DOWNLOAD_SUCCEEDED="ダウンロードしました。<br>ダウンロードしたプログラムは、Windowsだと「ruby {$filename}」、Macだと「rsdl {$filename}」で実行できます。",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_DOWNLOAD_ERROR="ダウンロードできませんでした",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_LOAD_CONFIRM="まだセーブしていないのでロードするとプログラムが消えてしまうよ!\nそれでもロードしますか?",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_SAVE_ERROR_NO_NAME="セーブする前にプログラムに名前をつけてね!",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_SAVE_BLOCKUI_TITLE="プログラムのセーブ中",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_SAVE_BLOCKUI_MESSAGE="プログラムをセーブしています。",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_SAVE_BLOCKUI_NOTICE="プログラムの名前は「{$filename}」です。<br>プログラムはホームディレクトリにセーブします。<br>",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_SAVE_ERROR_MESSAGE="セーブできませんでした",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_SAVE_CANCELED="セーブをキャンセルしました",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_SAVE_SUCCEEDED="セーブしました",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_CHECK_BLOCKUI_TITLE="プログラムのチェック中",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_CHECK_BLOCKUI_MESSAGE="プログラムの文法をチェックしています。",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_CHECK_BLOCKUI_NOTICE="このチェックは簡易的なものですので、<br>プログラムを動かすとエラーが見つかるかもしれません。",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_CHECK_SUCCEEDED="チェックしました",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_CHECK_SUCCEEDED_NOTICE="ただし、プログラムを動かすとエラーが見つかるかもしれません。",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_CHECK_ERROR="チェックできませんでした",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_SIGNOUT_SUCCEEDED="ログアウトしました",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_SIGNOUT_ERROR="ログアウトに失敗しました",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_LOAD_ERROR="{$filename}{$error}",Blockly.Msg.VIEWS_MAIN_MENU_VIEW_LOAD_SUCCEEDED="ロードしました",Blockly.Msg.VIEWS_LOAD_MODAL_VIEW_ERROR="ロードに失敗しました",Blockly.Msg.VIEWS_SIGNIN_MODAL_VIEW_SIGNED_IN="ログインしました",Blockly.Msg.VIEWS_SIGNIN_MODAL_VIEW_ERROR="ログインに失敗しました",Blockly.Msg.BLOCKS_MOTION_MOVE="■%1歩動かす",Blockly.Msg.BLOCKS_MOTION_TURN_RIGHT_DEGREES="■時計回りに%1度回す",Blockly.Msg.BLOCKS_MOTION_TURN_LEFT_DEGREES="■反時計回りに%1度回す",Blockly.Msg.BLOCKS_MOTION_POINT_IN_DIRECTION="■%1 度に向ける",Blockly.Msg.BLOCKS_MOTION_POINT_TOWARDS_MOUSE="■マウスポインターへ向ける",Blockly.Msg.BLOCKS_MOTION_POINT_TOWARDS_CHARACTER="■%1 へ向ける",Blockly.Msg.BLOCKS_MOTION_SET_X_Y="■x座標を %1 、y座標を %2 にする",Blockly.Msg.BLOCKS_MOTION_GO_TO_MOUSE="■マウスポインターへ行く",Blockly.Msg.BLOCKS_MOTION_GO_TO_CHARACTER="■%1 へ行く",Blockly.Msg.BLOCKS_MOTION_CHANGE_X_BY="■x座標を %1 ずつ変える",Blockly.Msg.BLOCKS_MOTION_SET_X="■x座標を %1 にする",Blockly.Msg.BLOCKS_MOTION_CHANGE_Y_BY="■y座標を %1 ずつ変える",Blockly.Msg.BLOCKS_MOTION_SET_Y="■y座標を %1 にする",Blockly.Msg.BLOCKS_MOTION_TURN_IF_REACH_WALL="■もし端に着いたら、跳ね返る",Blockly.Msg.BLOCKS_MOTION_TURN="■跳ね返る",Blockly.Msg.BLOCKS_MOTION_TURN_XY_X="水平(x)",Blockly.Msg.BLOCKS_MOTION_TURN_XY_Y="垂直(y)",Blockly.Msg.BLOCKS_MOTION_TURN_XY="■%1 方向に跳ね返る",Blockly.Msg.BLOCKS_MOTION_SET_ROTATION_STYLE_LEFT_RIGHT="左右のみ",Blockly.Msg.BLOCKS_MOTION_SET_ROTATION_STYLE_NONE="回転しない",Blockly.Msg.BLOCKS_MOTION_SET_ROTATION_STYLE_FREE="自由に回転",Blockly.Msg.BLOCKS_MOTION_SET_ROTATION_STYLE="■回転方法を %1 にする",Blockly.Msg.BLOCKS_MOTION_SELF_X="■x座標",Blockly.Msg.BLOCKS_MOTION_SELF_Y="■y座標",Blockly.Msg.BLOCKS_MOTION_SELF_ANGLE="■向き",Blockly.Msg.BLOCKS_EVENTS_ON_START="♣実行ボタンがクリックされたとき",Blockly.Msg.BLOCKS_EVENTS_ON_KEY_PUSH_OR_DOWN="♣キーボードの %1 が %2 のとき",Blockly.Msg.BLOCKS_EVENTS_ON_CLICK="♣キャラクターがクリックされたとき",Blockly.Msg.BLOCKS_EVENTS_ON_HIT="♣%1 にぶつかったとき",Blockly.Msg.BLOCKS_SENSING_K_UP="↑",Blockly.Msg.BLOCKS_SENSING_K_DOWN="↓",Blockly.Msg.BLOCKS_SENSING_K_LEFT="←",Blockly.Msg.BLOCKS_SENSING_K_RIGHT="→",Blockly.Msg.BLOCKS_SENSING_K_SPACE="スペース",Blockly.Msg.BLOCKS_SENSING_PRESSED="押された",Blockly.Msg.BLOCKS_SENSING_PUSH=Blockly.Msg.BLOCKS_SENSING_PRESSED,Blockly.Msg.BLOCKS_SENSING_UP=Blockly.Msg.BLOCKS_SENSING_PRESSED,Blockly.Msg.BLOCKS_SENSING_HOLD_PRESSED="押され続けている",Blockly.Msg.BLOCKS_SENSING_HOLD_DOWN=Blockly.Msg.BLOCKS_SENSING_HOLD_PRESSED,Blockly.Msg.BLOCKS_SENSING_M_LBUTTON="左ボタン",Blockly.Msg.BLOCKS_SENSING_M_MBUTTON="中ボタン",Blockly.Msg.BLOCKS_SENSING_M_RBUTTON="右ボタン",Blockly.Msg.BLOCKS_SENSING_RELEASED="離された",Blockly.Msg.BLOCKS_SENSING_UP=Blockly.Msg.BLOCKS_SENSING_RELEASED,Blockly.Msg.BLOCKS_SENSING_REACH_WALL="◎端に触れた",Blockly.Msg.BLOCKS_SENSING_INPUT_KEY_PUSH_OR_DOWN_PREFIX="◎キーボードの",Blockly.Msg.BLOCKS_SENSING_INPUT_KEY_PUSH_OR_DOWN_MIDDLE="が",Blockly.Msg.BLOCKS_SENSING_INPUT_KEY_PUSH_OR_DOWN_SUFFIX="",Blockly.Msg.BLOCKS_SENSING_INPUT_MOUSE_PUSH_OR_DOWN_PREFIX="◎マウスの",Blockly.Msg.BLOCKS_SENSING_INPUT_MOUSE_PUSH_OR_DOWN_MIDDLE="が",Blockly.Msg.BLOCKS_SENSING_INPUT_MOUSE_PUSH_OR_DOWN_SUFFIX="",Blockly.Msg.BLOCKS_SENSING_INPUT_MOUSE_POS_X="◎マウスのx座標",Blockly.Msg.BLOCKS_SENSING_INPUT_MOUSE_POS_Y="◎マウスのy座標",Blockly.Msg.BLOCKS_SENSING_HIT_PREFIX="◎",Blockly.Msg.BLOCKS_SENSING_HIT_SUFFIX="に触れた",Blockly.Msg.BLOCKS_SENSING_CHARACTER_PROPERTY_X="x座標",Blockly.Msg.BLOCKS_SENSING_CHARACTER_PROPERTY_Y="y座標",Blockly.Msg.BLOCKS_SENSING_CHARACTER_PROPERTY_ANGLE="向き",Blockly.Msg.BLOCKS_SENSING_CHARACTER_PROPERTY_COSTUME_INDEX="コスチューム番号",Blockly.Msg.BLOCKS_SENSING_CHARACTER_PROPERTY_COSTUME="コスチューム名",Blockly.Msg.BLOCKS_SENSING_CHARACTER_PROPERTY_SCALE="大きさ",Blockly.Msg.BLOCKS_SENSING_CHARACTER_PROPERTY_VOLUME="ボリューム",Blockly.Msg.BLOCKS_SENSING_CHARACTER_PROPERTY="◎%1 の %2",Blockly.Msg.BLOCKS_SENSING_TIME_NOW_YEAR="年",Blockly.Msg.BLOCKS_SENSING_TIME_NOW_MONTH="月",Blockly.Msg.BLOCKS_SENSING_TIME_NOW_DAY="日",Blockly.Msg.BLOCKS_SENSING_TIME_NOW_WDAY="曜日",Blockly.Msg.BLOCKS_SENSING_TIME_NOW_HOUR="時",Blockly.Msg.BLOCKS_SENSING_TIME_NOW_MIN="分",Blockly.Msg.BLOCKS_SENSING_TIME_NOW_SEC="秒",Blockly.Msg.BLOCKS_SENSING_TIME_NOW="◎現在の %1",Blockly.Msg.BLOCKS_SENSING_DAYS_SINCE_2000="◎2000年からの日数",Blockly.Msg.BLOCKS_CONTROL_SLEEP="◆%1秒待つ",Blockly.Msg.BLOCKS_CONTROL_LOOP="◆ずっと",Blockly.Msg.BLOCKS_CONTROL_LOOP_END="を繰り返す",Blockly.Msg.BLOCKS_CONTROL_BREAK="◆繰り返しから脱出する",Blockly.Msg.BLOCKS_CONTROL_NEXT="◆以降の処理を飛ばして、次の回の処理を開始する",Blockly.Msg.BLOCKS_CONTROL_REDO="◆以降の処理を飛ばして、もう一度同じ処理をやり直す",Blockly.Msg.BLOCKS_CONTROL_IF="◆もし",Blockly.Msg.BLOCKS_CONTROL_THEN="ならば",Blockly.Msg.BLOCKS_CONTROL_ELSE="でなければ",Blockly.Msg.BLOCKS_CONTROL_TIMES="◆%1回繰り返す",Blockly.Msg.BLOCKS_CONTROL_AWAIT_UNTIL="◆%1まで待つ",Blockly.Msg.BLOCKS_CONTROL_UNTIL="◆%1まで",Blockly.Msg.BLOCKS_CONTROL_AWAIT="◆ほんの少し待つ",Blockly.Msg.BLOCKS_RUBY_STATEMENT="♠文",Blockly.Msg.BLOCKS_RUBY_EXPRESSION="♠式",Blockly.Msg.BLOCKS_RUBY_COMMENT="♠コメント",Blockly.Msg.BLOCKS_RUBY_P="♠p %1",Blockly.Msg.BLOCKS_FIELD_CHARACTER_NO_CHARACTER="キャラクターなし",Blockly.Msg.BLOCKS_SOUND_PRESET_SOUNDS="♪%1",Blockly.Msg.BLOCKS_SOUND_PRESET_SOUNDS_PIANO_DO="ピアノのド",Blockly.Msg.BLOCKS_SOUND_PRESET_SOUNDS_PIANO_RE="ピアノのレ",Blockly.Msg.BLOCKS_SOUND_PRESET_SOUNDS_PIANO_MI="ピアノのミ",Blockly.Msg.BLOCKS_SOUND_PRESET_SOUNDS_PIANO_FA="ピアノのファ",Blockly.Msg.BLOCKS_SOUND_PRESET_SOUNDS_PIANO_SO="ピアノのソ",Blockly.Msg.BLOCKS_SOUND_PRESET_SOUNDS_PIANO_RA="ピアノのラ",Blockly.Msg.BLOCKS_SOUND_PRESET_SOUNDS_PIANO_SI="ピアノのシ",Blockly.Msg.BLOCKS_SOUND_PRESET_SOUNDS_PIANO_DO_2="ピアノの高いド",Blockly.Msg.BLOCKS_SOUND_PLAY="♪%1 の音を鳴らす",Blockly.Msg.BLOCKS_LOOKS_SAY="★%1 と言う",Blockly.Msg.BLOCKS_LOOKS_THINK="★%1 と考える",Blockly.Msg.BLOCKS_LOOKS_SAY_WITH_SECOND="★%1 と %2 秒と言う",Blockly.Msg.BLOCKS_LOOKS_THINK_WITH_SECOND="★%1 と %2 秒と考える",Blockly.Msg.BLOCKS_LOOKS_SHOW="★表示する",Blockly.Msg.BLOCKS_LOOKS_HIDE="★隠す",Blockly.Msg.BLOCKS_LOOKS_VANISH="★消滅する",Blockly.Msg.BLOCKS_HARDWARE_LED_TURN_ON="★LED %1 をオンにする",Blockly.Msg.BLOCKS_HARDWARE_LED_TURN_OFF="★LED %1 をオフにする",Blockly.Msg.BLOCKS_HARDWARE_ANODE="アノード",Blockly.Msg.BLOCKS_HARDWARE_CATHODE="カソード",Blockly.Msg.BLOCKS_HARDWARE_LEFT=" 左",Blockly.Msg.BLOCKS_HARDWARE_RIGHT="右",Blockly.Msg.BLOCKS_HARDWARE_INIT_HARDWARE="♠ハードウェアを準備する",Blockly.Msg.BLOCKS_HARDWARE_RGB_LED_SET_COLOR="★RGB LED %1 コモン %2 を %3 にする",Blockly.Msg.BLOCKS_HARDWARE_RGB_LED_TURN_OFF="★RGB LED %1 コモン %2 をオフにする",Blockly.Msg.BLOCKS_HARDWARE_SEVEN_SEGMENT_DISPLAY_SHOW="★7セグディスプレイに %1 を表示する",Blockly.Msg.BLOCKS_HARDWARE_SEVEN_SEGMENT_DISPLAY_OFF="★7セグディスプレイをオフにする",Blockly.Msg.BLOCKS_HARDWARE_LCD_PUTS="★LCDに %1 を表示する",Blockly.Msg.BLOCKS_HARDWARE_LCD_CLEAR="★LCDをクリアする",Blockly.Msg.BLOCKS_HARDWARE_SERVO_SET_POSITION="■サーボ %1 を %2 度(5~180)にする",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_FORWARD="■2WD車 %1 を進める",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_BACKWARD="■2WD車 %1 をバックさせる",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_TURN_LEFT="■2WD車 %1 を左に曲げる",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_TURN_RIGHT="■2WD車 %1 を右に曲げる",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_STOP="■2WD車 %1 を止める",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_RUN="■2WD車 %2 を %3 秒 %1",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_COMMANDS="■%1",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_COMMANDS_FORWARD="進める",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_COMMANDS_BACKWARD="バックさせる",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_COMMANDS_TURN_LEFT="左に曲げる",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_COMMANDS_TURN_RIGHT="右に曲げる",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_COMMANDS_STOP="止める",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_SET_SPEED="■2WD車 %1 の %2 の速度(%)を %3 にする",Blockly.Msg.BLOCKS_HARDWARE_TWO_WHEEL_DRIVE_CAR_SPEED="◎2WD車 %1 の %2 の速度(%)",Blockly.Msg.BLOCKS_HARDWARE_MOTOR_DRIVER_FORWARD="正転させる",Blockly.Msg.BLOCKS_HARDWARE_MOTOR_DRIVER_BACKWARD="逆転させる",Blockly.Msg.BLOCKS_HARDWARE_MOTOR_DRIVER_STOP="止める",Blockly.Msg.BLOCKS_HARDWARE_MOTOR_DRIVER="■(モータードライバ %1 で)モーターを %2",Blockly.Msg.BLOCKS_HARDWARE_MOTOR_DRIVER_SET_SPEED="■(モータードライバ %1 の)モーターの速度を %2 にする",Blockly.Msg.BLOCKS_HARDWARE_MOTOR_DRIVER_SPEED="◎(モータードライバ %1 の)モーターの速度(%)",Blockly.Msg.BLOCKS_HARDWARE_BUTTON_PRESSED_OR_RELEASED="◎ボタン %1 が %2 ?",Blockly.Msg.BLOCKS_HARDWARE_SENSOR_VALUE="◎センサー %1",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_V3_LED_TURN_ON_OR_OFF="★スモウルボットV3の %1 LEDを %2",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_V3_MOTOR_SPEED="◎スモウルボットV3の %1 モーターの速度(%)",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_V3_MOTOR_SET_SPEED="■スモウルボットV3の %1 モーターの速度を %2 (%) にする",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_V3_ACTION="■スモウルボットV3を %1",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_V3_ACTION_WITH_SEC="■スモウルボットV3を %2 秒 %1",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_V3_TOUCH_SENSOR_PRESSED_OR_RELEASED="◎スモウルボットV3の %1 のタッチセンサーが %2 ?",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_V3_LIGHT_SENSOR_VALUE="◎スモウルボットV3の光センサー",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_S1_LED_TURN_ON_OR_OFF="★スモウルボットS1の %1 LEDを %2",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_S1_ACTION="■スモウルボットS1を %1",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_S1_ACTION_WITH_SEC="■スモウルボットS1を %2 秒 %1",Blockly.Msg.BLOCKS_HARDWARE_SMALRUBOT_S1_IR_PHOTOREFLECTOR_VALUE="◎スモウルボットS1の %1 のセンサー",Blockly.Msg.BLOCKS_OPERATORS_ADD="%1+%2",Blockly.Msg.BLOCKS_OPERATORS_MINUS="%1ー%2",Blockly.Msg.BLOCKS_OPERATORS_MULTIPLY="%1×%2",Blockly.Msg.BLOCKS_OPERATORS_DIVIDE="%1÷%2",Blockly.Msg.BLOCKS_OPERATORS_COMPARE_LT="%1<%2",Blockly.Msg.BLOCKS_OPERATORS_COMPARE_LTE="%1≦%2",Blockly.Msg.BLOCKS_OPERATORS_COMPARE_EQ="%1=%2",Blockly.Msg.BLOCKS_OPERATORS_COMPARE_GTE="%1≧%2",Blockly.Msg.BLOCKS_OPERATORS_COMPARE_GT="%1>%2",Blockly.Msg.BLOCKS_OPERATORS_RAND="%1から%2までの乱数",Blockly.Msg.BLOCKS_OPERATORS_AND="%1かつ%2",Blockly.Msg.BLOCKS_OPERATORS_OR="%1または%2",Blockly.Msg.BLOCKS_OPERATORS_NOT="%1ではない",Blockly.Msg.BLOCKS_OPERATORS_INDEX_OF="%1の%2番目",Blockly.Msg.BLOCKS_OPERATORS_LENGTH="%1の長さ",Blockly.Msg.BLOCKS_OPERATORS_MODULO="%1を%2で割った余り",Blockly.Msg.BLOCKS_OPERATORS_ROUND="%1を四捨五入",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD="%1の%2",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_ABS="絶対値",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_FLOOR="切り上げ",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_CEIL="切り下げ",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_SQRT="平方根",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_SIN="sin",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_COS="cos",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_TAN="tan",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_ASIN="asin",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_ACOS="acos",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_ATAN="atan",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_LN="log",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_LOG="log10",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_E_SQUARE="e ^",Blockly.Msg.BLOCKS_OPERATORS_MATH_METHOD_10_SQUARE="10 ^",Blockly.Msg.BLOCKS_OPERATORS_TRUE="真",Blockly.Msg.BLOCKS_OPERATORS_FALSE="偽",Blockly.Msg.BLOCKS_PEN_DOWN_PEN="●ペンを下ろす",Blockly.Msg.BLOCKS_PEN_UP_PEN="●ペンを上げる",Blockly.Msg.BLOCKS_PEN_SET_PEN_COLOR="●ペンの色を%1にする",Blockly.Msg.VARIABLES_SET_TITLE="☼セット",Blockly.Msg.VARIABLES_GET_TITLE="☼";
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
div[aria-level="1"][aria-posinset="1"] .blocklyTreeRow{background-color:#006dcc !important}div[aria-level="1"][aria-posinset="1"] .blocklyTreeRow.blocklyTreeSelected{background-color:#0088ff !important}div[aria-level="1"][aria-posinset="2"] .blocklyTreeRow{background-color:#6600cc !important}div[aria-level="1"][aria-posinset="2"] .blocklyTreeRow.blocklyTreeSelected{background-color:#8000ff !important}div[aria-level="1"][aria-posinset="3"] .blocklyTreeRow{background-color:#cc00cc !important}div[aria-level="1"][aria-posinset="3"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ff00ff !important}div[aria-level="1"][aria-posinset="4"] .blocklyTreeRow{background-color:#00cc88 !important}div[aria-level="1"][aria-posinset="4"] .blocklyTreeRow.blocklyTreeSelected{background-color:#00ffaa !important}div[aria-level="1"][aria-posinset="5"] .blocklyTreeRow{background-color:#cc0066 !important}div[aria-level="1"][aria-posinset="5"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ff0080 !important}div[aria-level="1"][aria-posinset="6"] .blocklyTreeRow{background-color:#cc7100 !important}div[aria-level="1"][aria-posinset="6"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ff8d00 !important}div[aria-level="1"][aria-posinset="7"] .blocklyTreeRow{background-color:#cc9300 !important}div[aria-level="1"][aria-posinset="7"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ffb700 !important}div[aria-level="1"][aria-posinset="8"] .blocklyTreeRow{background-color:#00abcc !important}div[aria-level="1"][aria-posinset="8"] .blocklyTreeRow.blocklyTreeSelected{background-color:#00d5ff !important}div[aria-level="1"][aria-posinset="9"] .blocklyTreeRow{background-color:#44cc00 !important}div[aria-level="1"][aria-posinset="9"] .blocklyTreeRow.blocklyTreeSelected{background-color:#55ff00 !important}div[aria-level="1"][aria-posinset="10"] .blocklyTreeRow{background-color:#cc0044 !important}div[aria-level="1"][aria-posinset="10"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ff0055 !important}
|
@@ -0,0 +1 @@
|
|
1
|
+
div[aria-level="1"][aria-posinset="1"] .blocklyTreeRow{background-color:#006dcc !important}div[aria-level="1"][aria-posinset="1"] .blocklyTreeRow.blocklyTreeSelected{background-color:#0088ff !important}div[aria-level="1"][aria-posinset="2"] .blocklyTreeRow{background-color:#6600cc !important}div[aria-level="1"][aria-posinset="2"] .blocklyTreeRow.blocklyTreeSelected{background-color:#8000ff !important}div[aria-level="1"][aria-posinset="3"] .blocklyTreeRow{background-color:#cc0066 !important}div[aria-level="1"][aria-posinset="3"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ff0080 !important}div[aria-level="1"][aria-posinset="4"] .blocklyTreeRow{background-color:#cc7100 !important}div[aria-level="1"][aria-posinset="4"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ff8d00 !important}div[aria-level="1"][aria-posinset="5"] .blocklyTreeRow{background-color:#cc9300 !important}div[aria-level="1"][aria-posinset="5"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ffb700 !important}div[aria-level="1"][aria-posinset="6"] .blocklyTreeRow{background-color:#00abcc !important}div[aria-level="1"][aria-posinset="6"] .blocklyTreeRow.blocklyTreeSelected{background-color:#00d5ff !important}div[aria-level="1"][aria-posinset="7"] .blocklyTreeRow{background-color:#44cc00 !important}div[aria-level="1"][aria-posinset="7"] .blocklyTreeRow.blocklyTreeSelected{background-color:#55ff00 !important}
|
@@ -0,0 +1 @@
|
|
1
|
+
div[aria-level="1"][aria-posinset="1"] .blocklyTreeRow{background-color:#006dcc !important}div[aria-level="1"][aria-posinset="1"] .blocklyTreeRow.blocklyTreeSelected{background-color:#0088ff !important}div[aria-level="1"][aria-posinset="2"] .blocklyTreeRow{background-color:#6600cc !important}div[aria-level="1"][aria-posinset="2"] .blocklyTreeRow.blocklyTreeSelected{background-color:#8000ff !important}div[aria-level="1"][aria-posinset="3"] .blocklyTreeRow{background-color:#cc0066 !important}div[aria-level="1"][aria-posinset="3"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ff0080 !important}div[aria-level="1"][aria-posinset="4"] .blocklyTreeRow{background-color:#cc7100 !important}div[aria-level="1"][aria-posinset="4"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ff8d00 !important}div[aria-level="1"][aria-posinset="5"] .blocklyTreeRow{background-color:#cc9300 !important}div[aria-level="1"][aria-posinset="5"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ffb700 !important}div[aria-level="1"][aria-posinset="6"] .blocklyTreeRow{background-color:#00abcc !important}div[aria-level="1"][aria-posinset="6"] .blocklyTreeRow.blocklyTreeSelected{background-color:#00d5ff !important}div[aria-level="1"][aria-posinset="7"] .blocklyTreeRow{background-color:#44cc00 !important}div[aria-level="1"][aria-posinset="7"] .blocklyTreeRow.blocklyTreeSelected{background-color:#55ff00 !important}div[aria-level="1"][aria-posinset="8"] .blocklyTreeRow{background-color:#cc0044 !important}div[aria-level="1"][aria-posinset="8"] .blocklyTreeRow.blocklyTreeSelected{background-color:#ff0055 !important}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/smalruby-editor.gemspec
CHANGED
@@ -68,7 +68,8 @@ Gem::Specification.new do |spec|
|
|
68
68
|
['mime-types', '~> 1.16'],
|
69
69
|
['haml-rails'],
|
70
70
|
['nokogiri'],
|
71
|
-
['
|
71
|
+
['settingslogic'],
|
72
|
+
['smalruby', '~> 0.1.3'],
|
72
73
|
]
|
73
74
|
runtime_dependencies << ['therubyracer'] unless is_windows
|
74
75
|
runtime_dependencies.each do |args|
|
@@ -26,7 +26,7 @@
|
|
26
26
|
ならば 次のXMLと同等のブロックが配置されていること:
|
27
27
|
"""
|
28
28
|
<xml>
|
29
|
-
<block type="ruby_statement" x="0" y="0">
|
29
|
+
<block type="ruby_statement" id="1" x="0" y="0">
|
30
30
|
<field name="STATEMENT">stage1 = Stage.new(color: "white")</field>
|
31
31
|
</block>
|
32
32
|
</xml>
|
@@ -65,7 +65,7 @@
|
|
65
65
|
ならば 次のXMLと同等のブロックが配置されていること:
|
66
66
|
"""
|
67
67
|
<xml>
|
68
|
-
<block type="ruby_statement" x="0" y="0">
|
68
|
+
<block type="ruby_statement" id="1" x="0" y="0">
|
69
69
|
<field name="STATEMENT">stage1 = Stage.new(color: "white")</field>
|
70
70
|
</block>
|
71
71
|
</xml>
|
@@ -153,7 +153,7 @@
|
|
153
153
|
ならば 次のXMLと同等のブロックが配置されていること:
|
154
154
|
"""
|
155
155
|
<xml>
|
156
|
-
<block type="ruby_statement" x="0" y="0">
|
156
|
+
<block type="ruby_statement" id="1" x="0" y="0">
|
157
157
|
<field name="STATEMENT">stage1 = Stage.new(color: "white")</field>
|
158
158
|
</block>
|
159
159
|
</xml>
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# language: en
|
3
|
+
@javascript
|
4
|
+
Feature: hardware_smalrubot_s1_action block
|
5
|
+
Background:
|
6
|
+
Given "ブロック" タブを表示する
|
7
|
+
And キャラクターcar1を追加する
|
8
|
+
|
9
|
+
Scenario: ブロックのみ配置する
|
10
|
+
When 次のブロックを配置する:
|
11
|
+
"""
|
12
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
13
|
+
%field{:name => "ACTION"}<
|
14
|
+
backward
|
15
|
+
"""
|
16
|
+
And ブロックからソースコードを生成する
|
17
|
+
|
18
|
+
Then テキストエディタのプログラムは "" であること
|
19
|
+
|
20
|
+
Scenario: キャラクターとブロックを配置する
|
21
|
+
When 次のブロックを配置する:
|
22
|
+
"""
|
23
|
+
%block{:type => "character_new", :x => "21", :y => "15"}
|
24
|
+
%field{:name => "NAME"}<
|
25
|
+
car1
|
26
|
+
%statement{:name => "DO"}
|
27
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
28
|
+
%field{:name => "ACTION"}<
|
29
|
+
forward
|
30
|
+
%next
|
31
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
32
|
+
%field{:name => "ACTION"}<
|
33
|
+
backward
|
34
|
+
%next
|
35
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
36
|
+
%field{:name => "ACTION"}<
|
37
|
+
turn_left
|
38
|
+
%next
|
39
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
40
|
+
%field{:name => "ACTION"}<
|
41
|
+
turn_right
|
42
|
+
%next
|
43
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
44
|
+
%field{:name => "ACTION"}<
|
45
|
+
stop
|
46
|
+
"""
|
47
|
+
And ブロックからソースコードを生成する
|
48
|
+
|
49
|
+
Then テキストエディタのプログラムは以下であること:
|
50
|
+
"""
|
51
|
+
require "smalruby"
|
52
|
+
|
53
|
+
car1 = Character.new(costume: "car1.png", x: 0, y: 0, angle: 0)
|
54
|
+
car1.smalrubot_s1.forward
|
55
|
+
car1.smalrubot_s1.backward
|
56
|
+
car1.smalrubot_s1.turn_left
|
57
|
+
car1.smalrubot_s1.turn_right
|
58
|
+
car1.smalrubot_s1.stop
|
59
|
+
|
60
|
+
"""
|
61
|
+
|
62
|
+
Scenario: キャラクターとイベントとブロックを配置する
|
63
|
+
When 次のブロックを配置する:
|
64
|
+
"""
|
65
|
+
%block{:type => "character_new", :x => "21", :y => "15"}
|
66
|
+
%field{:name => "NAME"}<
|
67
|
+
car1
|
68
|
+
%statement{:name => "DO"}
|
69
|
+
%block{:type => "events_on_start"}
|
70
|
+
%statement{:name => "DO"}
|
71
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
72
|
+
%field{:name => "ACTION"}<
|
73
|
+
forward
|
74
|
+
%next
|
75
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
76
|
+
%field{:name => "ACTION"}<
|
77
|
+
backward
|
78
|
+
%next
|
79
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
80
|
+
%field{:name => "ACTION"}<
|
81
|
+
turn_left
|
82
|
+
%next
|
83
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
84
|
+
%field{:name => "ACTION"}<
|
85
|
+
turn_right
|
86
|
+
%next
|
87
|
+
%block{:type => "hardware_smalrubot_s1_action", :x => "0", :y => "0"}
|
88
|
+
%field{:name => "ACTION"}<
|
89
|
+
stop
|
90
|
+
"""
|
91
|
+
And ブロックからソースコードを生成する
|
92
|
+
|
93
|
+
Then テキストエディタのプログラムは以下であること:
|
94
|
+
"""
|
95
|
+
require "smalruby"
|
96
|
+
|
97
|
+
car1 = Character.new(costume: "car1.png", x: 0, y: 0, angle: 0)
|
98
|
+
|
99
|
+
car1.on(:start) do
|
100
|
+
smalrubot_s1.forward
|
101
|
+
smalrubot_s1.backward
|
102
|
+
smalrubot_s1.turn_left
|
103
|
+
smalrubot_s1.turn_right
|
104
|
+
smalrubot_s1.stop
|
105
|
+
end
|
106
|
+
|
107
|
+
"""
|
@@ -0,0 +1,151 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# language: en
|
3
|
+
@javascript
|
4
|
+
Feature: hardware_smalrubot_s1_action_with_sec block
|
5
|
+
Background:
|
6
|
+
Given "ブロック" タブを表示する
|
7
|
+
And キャラクターcar1を追加する
|
8
|
+
|
9
|
+
Scenario: ブロックのみ配置する
|
10
|
+
When 次のブロックを配置する:
|
11
|
+
"""
|
12
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
13
|
+
%field{:name => "ACTION"}<
|
14
|
+
backward
|
15
|
+
%value{:name => "SEC"}
|
16
|
+
%block{:type => "math_number"}
|
17
|
+
%field{:name => "NUM"}<
|
18
|
+
0.5
|
19
|
+
"""
|
20
|
+
And ブロックからソースコードを生成する
|
21
|
+
|
22
|
+
Then テキストエディタのプログラムは "" であること
|
23
|
+
|
24
|
+
Scenario: キャラクターとブロックを配置する
|
25
|
+
When 次のブロックを配置する:
|
26
|
+
"""
|
27
|
+
%block{:type => "character_new", :x => "21", :y => "15"}
|
28
|
+
%field{:name => "NAME"}<
|
29
|
+
car1
|
30
|
+
%statement{:name => "DO"}
|
31
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
32
|
+
%field{:name => "ACTION"}<
|
33
|
+
forward
|
34
|
+
%value{:name => "SEC"}
|
35
|
+
%block{:type => "math_number"}
|
36
|
+
%field{:name => "NUM"}<
|
37
|
+
0.5
|
38
|
+
%next
|
39
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
40
|
+
%field{:name => "ACTION"}<
|
41
|
+
backward
|
42
|
+
%value{:name => "SEC"}
|
43
|
+
%block{:type => "math_number"}
|
44
|
+
%field{:name => "NUM"}<
|
45
|
+
0.5
|
46
|
+
%next
|
47
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
48
|
+
%field{:name => "ACTION"}<
|
49
|
+
turn_left
|
50
|
+
%value{:name => "SEC"}
|
51
|
+
%block{:type => "math_number"}
|
52
|
+
%field{:name => "NUM"}<
|
53
|
+
0.5
|
54
|
+
%next
|
55
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
56
|
+
%field{:name => "ACTION"}<
|
57
|
+
turn_right
|
58
|
+
%value{:name => "SEC"}
|
59
|
+
%block{:type => "math_number"}
|
60
|
+
%field{:name => "NUM"}<
|
61
|
+
0.5
|
62
|
+
%next
|
63
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
64
|
+
%field{:name => "ACTION"}<
|
65
|
+
stop
|
66
|
+
%value{:name => "SEC"}
|
67
|
+
%block{:type => "math_number"}
|
68
|
+
%field{:name => "NUM"}<
|
69
|
+
0.5
|
70
|
+
"""
|
71
|
+
And ブロックからソースコードを生成する
|
72
|
+
|
73
|
+
Then テキストエディタのプログラムは以下であること:
|
74
|
+
"""
|
75
|
+
require "smalruby"
|
76
|
+
|
77
|
+
car1 = Character.new(costume: "car1.png", x: 0, y: 0, angle: 0)
|
78
|
+
car1.smalrubot_s1.forward(sec: 0.5)
|
79
|
+
car1.smalrubot_s1.backward(sec: 0.5)
|
80
|
+
car1.smalrubot_s1.turn_left(sec: 0.5)
|
81
|
+
car1.smalrubot_s1.turn_right(sec: 0.5)
|
82
|
+
car1.smalrubot_s1.stop(sec: 0.5)
|
83
|
+
|
84
|
+
"""
|
85
|
+
|
86
|
+
Scenario: キャラクターとイベントとブロックを配置する
|
87
|
+
When 次のブロックを配置する:
|
88
|
+
"""
|
89
|
+
%block{:type => "character_new", :x => "21", :y => "15"}
|
90
|
+
%field{:name => "NAME"}<
|
91
|
+
car1
|
92
|
+
%statement{:name => "DO"}
|
93
|
+
%block{:type => "events_on_start"}
|
94
|
+
%statement{:name => "DO"}
|
95
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
96
|
+
%field{:name => "ACTION"}<
|
97
|
+
forward
|
98
|
+
%value{:name => "SEC"}
|
99
|
+
%block{:type => "math_number"}
|
100
|
+
%field{:name => "NUM"}<
|
101
|
+
0.5
|
102
|
+
%next
|
103
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
104
|
+
%field{:name => "ACTION"}<
|
105
|
+
backward
|
106
|
+
%value{:name => "SEC"}
|
107
|
+
%block{:type => "math_number"}
|
108
|
+
%field{:name => "NUM"}<
|
109
|
+
0.5
|
110
|
+
%next
|
111
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
112
|
+
%field{:name => "ACTION"}<
|
113
|
+
turn_left
|
114
|
+
%value{:name => "SEC"}
|
115
|
+
%block{:type => "math_number"}
|
116
|
+
%field{:name => "NUM"}<
|
117
|
+
0.5
|
118
|
+
%next
|
119
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
120
|
+
%field{:name => "ACTION"}<
|
121
|
+
turn_right
|
122
|
+
%value{:name => "SEC"}
|
123
|
+
%block{:type => "math_number"}
|
124
|
+
%field{:name => "NUM"}<
|
125
|
+
0.5
|
126
|
+
%next
|
127
|
+
%block{:type => "hardware_smalrubot_s1_action_with_sec", :x => "0", :y => "0"}
|
128
|
+
%field{:name => "ACTION"}<
|
129
|
+
stop
|
130
|
+
%value{:name => "SEC"}
|
131
|
+
%block{:type => "math_number"}
|
132
|
+
%field{:name => "NUM"}<
|
133
|
+
0.5
|
134
|
+
"""
|
135
|
+
And ブロックからソースコードを生成する
|
136
|
+
|
137
|
+
Then テキストエディタのプログラムは以下であること:
|
138
|
+
"""
|
139
|
+
require "smalruby"
|
140
|
+
|
141
|
+
car1 = Character.new(costume: "car1.png", x: 0, y: 0, angle: 0)
|
142
|
+
|
143
|
+
car1.on(:start) do
|
144
|
+
smalrubot_s1.forward(sec: 0.5)
|
145
|
+
smalrubot_s1.backward(sec: 0.5)
|
146
|
+
smalrubot_s1.turn_left(sec: 0.5)
|
147
|
+
smalrubot_s1.turn_right(sec: 0.5)
|
148
|
+
smalrubot_s1.stop(sec: 0.5)
|
149
|
+
end
|
150
|
+
|
151
|
+
"""
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# language: en
|
3
|
+
@javascript
|
4
|
+
Feature: hardware_smalrubot_s1_ir_photoreflector_value block
|
5
|
+
Scenario: ブロックのみ配置する
|
6
|
+
Given "ブロック" タブを表示する
|
7
|
+
|
8
|
+
When 次のブロックを配置する:
|
9
|
+
"""
|
10
|
+
%block{:type => "hardware_smalrubot_s1_ir_photoreflector_value", :x => "0", :y => "0"}
|
11
|
+
%field{:name => "LOR"}<
|
12
|
+
right
|
13
|
+
"""
|
14
|
+
And ブロックからソースコードを生成する
|
15
|
+
|
16
|
+
Then テキストエディタのプログラムは "" であること
|
17
|
+
|
18
|
+
Scenario: 文とブロックを配置する
|
19
|
+
Given "ブロック" タブを表示する
|
20
|
+
|
21
|
+
When 次のブロックを配置する:
|
22
|
+
"""
|
23
|
+
%block{:type => "ruby_p", :x => "0", :y => "0", :inline => "true" }
|
24
|
+
%value{:name => "ARG"}
|
25
|
+
%block{:type => "hardware_smalrubot_s1_ir_photoreflector_value", :x => "0", :y => "0"}
|
26
|
+
%field{:name => "LOR"}<
|
27
|
+
right
|
28
|
+
"""
|
29
|
+
And ブロックからソースコードを生成する
|
30
|
+
|
31
|
+
Then テキストエディタのプログラムは以下であること:
|
32
|
+
"""
|
33
|
+
require "smalruby"
|
34
|
+
|
35
|
+
p("")
|
36
|
+
|
37
|
+
"""
|
38
|
+
|
39
|
+
Scenario: キャラクターとブロックを配置する
|
40
|
+
Given "ブロック" タブを表示する
|
41
|
+
And 次のキャラクターを追加する:
|
42
|
+
| name | costumes | x | y | angle |
|
43
|
+
| car1 | car1.png | 0 | 0 | 0 |
|
44
|
+
|
45
|
+
When 次のブロックを配置する:
|
46
|
+
"""
|
47
|
+
%block{:type => "character_new", :x => "21", :y => "15"}
|
48
|
+
%field{:name => "NAME"}<
|
49
|
+
car1
|
50
|
+
%statement{:name => "DO"}
|
51
|
+
%block{:type => "ruby_p", :x => "0", :y => "0", :inline => "true" }
|
52
|
+
%value{:name => "ARG"}
|
53
|
+
%block{:type => "hardware_smalrubot_s1_ir_photoreflector_value", :x => "0", :y => "0"}
|
54
|
+
%field{:name => "LOR"}<
|
55
|
+
right
|
56
|
+
"""
|
57
|
+
And ブロックからソースコードを生成する
|
58
|
+
|
59
|
+
Then テキストエディタのプログラムは以下であること:
|
60
|
+
"""
|
61
|
+
require "smalruby"
|
62
|
+
|
63
|
+
car1 = Character.new(costume: "car1.png", x: 0, y: 0, angle: 0)
|
64
|
+
p(car1.smalrubot_s1.right_ir_photoreflector_value)
|
65
|
+
|
66
|
+
"""
|
67
|
+
|
68
|
+
Scenario: キャラクターとイベントとブロックを配置する
|
69
|
+
Given "ブロック" タブを表示する
|
70
|
+
And 次のキャラクターを追加する:
|
71
|
+
| name | costumes | x | y | angle |
|
72
|
+
| car1 | car1.png | 0 | 0 | 0 |
|
73
|
+
|
74
|
+
When 次のブロックを配置する:
|
75
|
+
"""
|
76
|
+
%block{:type => "character_new", :x => "21", :y => "15"}
|
77
|
+
%field{:name => "NAME"}<
|
78
|
+
car1
|
79
|
+
%statement{:name => "DO"}
|
80
|
+
%block{:type => "events_on_start"}
|
81
|
+
%statement{:name => "DO"}
|
82
|
+
%block{:type => "ruby_p", :x => "0", :y => "0", :inline => "true" }
|
83
|
+
%value{:name => "ARG"}
|
84
|
+
%block{:type => "hardware_smalrubot_s1_ir_photoreflector_value", :x => "0", :y => "0"}
|
85
|
+
%field{:name => "LOR"}<
|
86
|
+
left
|
87
|
+
"""
|
88
|
+
And ブロックからソースコードを生成する
|
89
|
+
|
90
|
+
Then テキストエディタのプログラムは以下であること:
|
91
|
+
"""
|
92
|
+
require "smalruby"
|
93
|
+
|
94
|
+
car1 = Character.new(costume: "car1.png", x: 0, y: 0, angle: 0)
|
95
|
+
|
96
|
+
car1.on(:start) do
|
97
|
+
p(smalrubot_s1.left_ir_photoreflector_value)
|
98
|
+
end
|
99
|
+
|
100
|
+
"""
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# language: en
|
3
|
+
@javascript
|
4
|
+
Feature: hardware_smalrubot_s1_led_turn_on_or_off block
|
5
|
+
Background:
|
6
|
+
Given "ブロック" タブを表示する
|
7
|
+
And キャラクターcar1を追加する
|
8
|
+
|
9
|
+
Scenario: ブロックのみ配置する
|
10
|
+
When 次のブロックを配置する:
|
11
|
+
"""
|
12
|
+
%block{:type => "hardware_smalrubot_s1_led_turn_on_or_off", :x => "0", :y => "0"}
|
13
|
+
%field{:name => "COLOUR"}<
|
14
|
+
white
|
15
|
+
%field{:name => "OOO"}<
|
16
|
+
turn_off
|
17
|
+
"""
|
18
|
+
And ブロックからソースコードを生成する
|
19
|
+
|
20
|
+
Then テキストエディタのプログラムは "" であること
|
21
|
+
|
22
|
+
Scenario: キャラクターとブロックを配置する
|
23
|
+
When 次のブロックを配置する:
|
24
|
+
"""
|
25
|
+
%block{:type => "character_new", :x => "21", :y => "15"}
|
26
|
+
%field{:name => "NAME"}<
|
27
|
+
car1
|
28
|
+
%statement{:name => "DO"}
|
29
|
+
%block{:type => "hardware_smalrubot_s1_led_turn_on_or_off", :x => "0", :y => "0"}
|
30
|
+
%field{:name => "COLOUR"}<
|
31
|
+
white
|
32
|
+
%field{:name => "OOO"}<
|
33
|
+
turn_off
|
34
|
+
"""
|
35
|
+
And ブロックからソースコードを生成する
|
36
|
+
|
37
|
+
Then テキストエディタのプログラムは以下であること:
|
38
|
+
"""
|
39
|
+
require "smalruby"
|
40
|
+
|
41
|
+
car1 = Character.new(costume: "car1.png", x: 0, y: 0, angle: 0)
|
42
|
+
car1.smalrubot_s1.turn_off_white_led
|
43
|
+
|
44
|
+
"""
|
45
|
+
|
46
|
+
Scenario: キャラクターとイベントとブロックを配置する
|
47
|
+
When 次のブロックを配置する:
|
48
|
+
"""
|
49
|
+
%block{:type => "character_new", :x => "21", :y => "15"}
|
50
|
+
%field{:name => "NAME"}<
|
51
|
+
car1
|
52
|
+
%statement{:name => "DO"}
|
53
|
+
%block{:type => "events_on_start"}
|
54
|
+
%statement{:name => "DO"}
|
55
|
+
%block{:type => "hardware_smalrubot_s1_led_turn_on_or_off", :x => "0", :y => "0"}
|
56
|
+
%field{:name => "COLOUR"}<
|
57
|
+
blue
|
58
|
+
%field{:name => "OOO"}<
|
59
|
+
turn_on
|
60
|
+
"""
|
61
|
+
And ブロックからソースコードを生成する
|
62
|
+
|
63
|
+
Then テキストエディタのプログラムは以下であること:
|
64
|
+
"""
|
65
|
+
require "smalruby"
|
66
|
+
|
67
|
+
car1 = Character.new(costume: "car1.png", x: 0, y: 0, angle: 0)
|
68
|
+
|
69
|
+
car1.on(:start) do
|
70
|
+
smalrubot_s1.turn_on_blue_led
|
71
|
+
end
|
72
|
+
|
73
|
+
"""
|
@@ -29,21 +29,21 @@
|
|
29
29
|
"""
|
30
30
|
<xml>
|
31
31
|
<character x="0" y="0" name="car1" costumes="car1.png" angle="0"></character>
|
32
|
-
<block type="character_new" x="0" y="0">
|
32
|
+
<block type="character_new" id="1" x="0" y="0">
|
33
33
|
<field name="NAME">car1</field>
|
34
34
|
<statement name="DO">
|
35
|
-
<block type="events_on_start">
|
35
|
+
<block type="events_on_start" id="2">
|
36
36
|
<statement name="DO">
|
37
|
-
<block type="control_loop">
|
37
|
+
<block type="control_loop" id="3">
|
38
38
|
<statement name="DO">
|
39
|
-
<block type="motion_move" inline="true">
|
39
|
+
<block type="motion_move" id="4" inline="true">
|
40
40
|
<value name="STEP">
|
41
|
-
<block type="math_number">
|
41
|
+
<block type="math_number" id="5">
|
42
42
|
<field name="NUM">10</field>
|
43
43
|
</block>
|
44
44
|
</value>
|
45
45
|
<next>
|
46
|
-
<block type="motion_turn_if_reach_wall"></block>
|
46
|
+
<block type="motion_turn_if_reach_wall" id="6"></block>
|
47
47
|
</next>
|
48
48
|
</block>
|
49
49
|
</statement>
|
@@ -72,12 +72,12 @@
|
|
72
72
|
"""
|
73
73
|
<xml>
|
74
74
|
<character x="300" y="200" name="car1" costumes="car4.png" angle="90"></character>
|
75
|
-
<block type="character_new" x="0" y="0">
|
75
|
+
<block type="character_new" id="1" x="0" y="0">
|
76
76
|
<field name="NAME">car1</field>
|
77
77
|
<statement name="DO">
|
78
|
-
<block type="motion_move" inline="true">
|
78
|
+
<block type="motion_move" id="2" inline="true">
|
79
79
|
<value name="STEP">
|
80
|
-
<block type="math_number">
|
80
|
+
<block type="math_number" id="3">
|
81
81
|
<field name="NUM">10</field>
|
82
82
|
</block>
|
83
83
|
</value>
|