diff options
| author | Amir Rajan <[email protected]> | 2020-09-11 02:02:01 -0500 |
|---|---|---|
| committer | Amir Rajan <[email protected]> | 2020-09-11 02:02:57 -0500 |
| commit | 33ec37b141e896b47ed642923fd33b0c658ae9fb (patch) | |
| tree | a40d3e5d41beeb06508200078f6f26b0ee57d6a4 /samples/99_genre_platformer/gorillas_basic/app/repl.rb | |
| parent | 958cf43779d2bf528869e80511c4c4f2a433b2db (diff) | |
| download | dragonruby-game-toolkit-contrib-33ec37b141e896b47ed642923fd33b0c658ae9fb.tar.gz dragonruby-game-toolkit-contrib-33ec37b141e896b47ed642923fd33b0c658ae9fb.zip | |
synced samples
Diffstat (limited to 'samples/99_genre_platformer/gorillas_basic/app/repl.rb')
| -rw-r--r-- | samples/99_genre_platformer/gorillas_basic/app/repl.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/samples/99_genre_platformer/gorillas_basic/app/repl.rb b/samples/99_genre_platformer/gorillas_basic/app/repl.rb new file mode 100644 index 0000000..4428c4b --- /dev/null +++ b/samples/99_genre_platformer/gorillas_basic/app/repl.rb @@ -0,0 +1,17 @@ +begin + if $gtk.args.state.current_turn == :player_1_angle + $gtk.args.state.player_1_angle = "#{60 + 10.randomize(:ratio).to_i}" + $you_so_basic_gorillas.input_execute_turn + $gtk.args.state.player_1_velocity = "#{30 + 20.randomize(:ratio).to_i}" + $you_so_basic_gorillas.input_execute_turn + elsif $gtk.args.state.current_turn == :player_2_angle + $gtk.args.state.player_2_angle = "#{60 + 10.randomize(:ratio).to_i}" + $you_so_basic_gorillas.input_execute_turn + $gtk.args.state.player_2_velocity = "#{30 + 20.randomize(:ratio).to_i}" + $you_so_basic_gorillas.input_execute_turn + else + $you_so_basic_gorillas.input_execute_turn + end +rescue Exception => e + puts e +end |
