basic101 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +2 -0
- data/.simplecov +1 -0
- data/.yardopts +7 -0
- data/Changelog.md +3 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +75 -0
- data/LICENSE.md +9 -0
- data/README.md +193 -0
- data/Rakefile +14 -0
- data/VERSION +1 -0
- data/bin/basic101 +10 -0
- data/lib/basic101/abs_function.rb +19 -0
- data/lib/basic101/argument_checker.rb +61 -0
- data/lib/basic101/arguments.rb +32 -0
- data/lib/basic101/array_reference.rb +52 -0
- data/lib/basic101/asc_function.rb +17 -0
- data/lib/basic101/basic_array.rb +69 -0
- data/lib/basic101/basic_comparisons.rb +20 -0
- data/lib/basic101/basic_float.rb +48 -0
- data/lib/basic101/basic_integer.rb +48 -0
- data/lib/basic101/basic_math.rb +22 -0
- data/lib/basic101/basic_numeric.rb +96 -0
- data/lib/basic101/basic_object.rb +35 -0
- data/lib/basic101/basic_string.rb +85 -0
- data/lib/basic101/binary_operation.rb +32 -0
- data/lib/basic101/binary_operations.rb +26 -0
- data/lib/basic101/built_in_functions.rb +31 -0
- data/lib/basic101/chr_function.rb +17 -0
- data/lib/basic101/cos_function.rb +17 -0
- data/lib/basic101/data_statement.rb +24 -0
- data/lib/basic101/define_function_statement.rb +23 -0
- data/lib/basic101/dim_statement.rb +25 -0
- data/lib/basic101/else_statement.rb +22 -0
- data/lib/basic101/end_statement.rb +13 -0
- data/lib/basic101/endif_statement.rb +19 -0
- data/lib/basic101/errors.rb +50 -0
- data/lib/basic101/exp_function.rb +17 -0
- data/lib/basic101/for_stack.rb +48 -0
- data/lib/basic101/for_statement.rb +57 -0
- data/lib/basic101/function.rb +11 -0
- data/lib/basic101/function_call.rb +32 -0
- data/lib/basic101/function_identifier.rb +8 -0
- data/lib/basic101/functions.rb +39 -0
- data/lib/basic101/gosub_statement.rb +23 -0
- data/lib/basic101/goto_statement.rb +23 -0
- data/lib/basic101/identifier.rb +23 -0
- data/lib/basic101/identity.rb +18 -0
- data/lib/basic101/if_statement.rb +31 -0
- data/lib/basic101/input.rb +44 -0
- data/lib/basic101/input_reader.rb +55 -0
- data/lib/basic101/input_statement.rb +46 -0
- data/lib/basic101/int_function.rb +17 -0
- data/lib/basic101/left_function.rb +19 -0
- data/lib/basic101/len_function.rb +18 -0
- data/lib/basic101/let_statement.rb +24 -0
- data/lib/basic101/line.rb +32 -0
- data/lib/basic101/log_function.rb +17 -0
- data/lib/basic101/main.rb +24 -0
- data/lib/basic101/mid_function.rb +20 -0
- data/lib/basic101/negate_operation.rb +21 -0
- data/lib/basic101/next_statement.rb +34 -0
- data/lib/basic101/not_operation.rb +23 -0
- data/lib/basic101/null_prompt_delimeter.rb +12 -0
- data/lib/basic101/null_transcript.rb +20 -0
- data/lib/basic101/numeric_identifier.rb +16 -0
- data/lib/basic101/on_goto_statement.rb +29 -0
- data/lib/basic101/output.rb +73 -0
- data/lib/basic101/parser.rb +457 -0
- data/lib/basic101/power_operation.rb +24 -0
- data/lib/basic101/print_comma.rb +20 -0
- data/lib/basic101/print_semicolon.rb +19 -0
- data/lib/basic101/print_statement.rb +33 -0
- data/lib/basic101/program.rb +100 -0
- data/lib/basic101/program_counter.rb +52 -0
- data/lib/basic101/prompt_delimeter.rb +13 -0
- data/lib/basic101/randomize_statement.rb +13 -0
- data/lib/basic101/read_statement.rb +25 -0
- data/lib/basic101/reference.rb +25 -0
- data/lib/basic101/remark_statement.rb +12 -0
- data/lib/basic101/restore_statement.rb +23 -0
- data/lib/basic101/return_statement.rb +16 -0
- data/lib/basic101/right_function.rb +19 -0
- data/lib/basic101/rnd_function.rb +24 -0
- data/lib/basic101/runtime.rb +132 -0
- data/lib/basic101/scalar_reference.rb +19 -0
- data/lib/basic101/sgn_function.rb +17 -0
- data/lib/basic101/sin_function.rb +17 -0
- data/lib/basic101/sqr_function.rb +17 -0
- data/lib/basic101/statement.rb +36 -0
- data/lib/basic101/stop_statement.rb +14 -0
- data/lib/basic101/str_function.rb +16 -0
- data/lib/basic101/string_identifier.rb +16 -0
- data/lib/basic101/tab.rb +18 -0
- data/lib/basic101/tab_function.rb +17 -0
- data/lib/basic101/tan_function.rb +17 -0
- data/lib/basic101/transcript.rb +37 -0
- data/lib/basic101/transform.rb +264 -0
- data/lib/basic101/user_defined_function.rb +54 -0
- data/lib/basic101/val_function.rb +16 -0
- data/lib/basic101.rb +93 -0
- data/rake_tasks/default.rake +1 -0
- data/rake_tasks/integration.rake +8 -0
- data/rake_tasks/jeweler.rake +28 -0
- data/rake_tasks/spec.rake +8 -0
- data/rake_tasks/test.rake +2 -0
- data/rake_tasks/yard.rake +3 -0
- data/test/integration/arguments.rb +25 -0
- data/test/integration/errors.rb +7 -0
- data/test/integration/integration_test.rb +28 -0
- data/test/integration/main.rb +49 -0
- data/test/integration/output_file.rb +40 -0
- data/test/integration/test.rb +135 -0
- data/test/integration/tests/basic_computer_games/23-match.bas +64 -0
- data/test/integration/tests/basic_computer_games/23-match.input +1 -0
- data/test/integration/tests/basic_computer_games/23-match.output +29 -0
- data/test/integration/tests/basic_computer_games/3dplot.bas +17 -0
- data/test/integration/tests/basic_computer_games/3dplot.input +0 -0
- data/test/integration/tests/basic_computer_games/3dplot.output +47 -0
- data/test/integration/tests/basic_computer_games/aceyducy.bas +100 -0
- data/test/integration/tests/basic_computer_games/aceyducy.input +8 -0
- data/test/integration/tests/basic_computer_games/aceyducy.output +78 -0
- data/test/integration/tests/basic_computer_games/amazing.bas +138 -0
- data/test/integration/tests/basic_computer_games/amazing.input +1 -0
- data/test/integration/tests/basic_computer_games/amazing.output +32 -0
- data/test/integration/tests/basic_computer_games/animal.bas +71 -0
- data/test/integration/tests/basic_computer_games/animal.input +17 -0
- data/test/integration/tests/basic_computer_games/animal.output +38 -0
- data/test/integration/tests/basic_computer_games/awari.bas +70 -0
- data/test/integration/tests/basic_computer_games/awari.input +11 -0
- data/test/integration/tests/basic_computer_games/awari.output +117 -0
- data/test/integration/tests/basic_computer_games/bagels.bas +81 -0
- data/test/integration/tests/basic_computer_games/bagels.input +12 -0
- data/test/integration/tests/basic_computer_games/bagels.output +42 -0
- data/test/integration/tests/basic_computer_games/banner.bas +94 -0
- data/test/integration/tests/basic_computer_games/banner.input +6 -0
- data/test/integration/tests/basic_computer_games/banner.output +135 -0
- data/test/integration/tests/basic_computer_games/basketbl.bas +196 -0
- data/test/integration/tests/basic_computer_games/basketbl.input +46 -0
- data/test/integration/tests/basic_computer_games/basketbl.output +509 -0
- data/test/integration/tests/basic_computer_games/batnum.bas +90 -0
- data/test/integration/tests/basic_computer_games/batnum.input +14 -0
- data/test/integration/tests/basic_computer_games/batnum.output +67 -0
- data/test/integration/tests/basic_computer_games/battle.bas +196 -0
- data/test/integration/tests/basic_computer_games/battle.input +21 -0
- data/test/integration/tests/basic_computer_games/battle.output +118 -0
- data/test/integration/tests/basic_computer_games/blackjck.bas +321 -0
- data/test/integration/tests/basic_computer_games/blackjck.input +26 -0
- data/test/integration/tests/basic_computer_games/blackjck.output +144 -0
- data/test/integration/tests/basic_computer_games/bombard.bas +93 -0
- data/test/integration/tests/basic_computer_games/bombard.input +20 -0
- data/test/integration/tests/basic_computer_games/bombard.output +175 -0
- data/test/integration/tests/basic_computer_games/bounce.bas +53 -0
- data/test/integration/tests/basic_computer_games/bounce.input +0 -0
- data/test/integration/tests/basic_computer_games/bounce.output +15 -0
- data/test/integration/tests/basic_computer_games/bowling.bas +101 -0
- data/test/integration/tests/basic_computer_games/bowling.input +23 -0
- data/test/integration/tests/basic_computer_games/bowling.output +229 -0
- data/test/integration/tests/basic_computer_games/boxing.bas +142 -0
- data/test/integration/tests/basic_computer_games/boxing.input +8 -0
- data/test/integration/tests/basic_computer_games/boxing.output +47 -0
- data/test/integration/tests/basic_computer_games/bug.bas +256 -0
- data/test/integration/tests/basic_computer_games/bug.input +17 -0
- data/test/integration/tests/basic_computer_games/bug.output +847 -0
- data/test/integration/tests/basic_computer_games/bullfght.bas +193 -0
- data/test/integration/tests/basic_computer_games/bullfght.input +4 -0
- data/test/integration/tests/basic_computer_games/bullfght.output +60 -0
- data/test/integration/tests/basic_computer_games/bullseye.bas +37 -0
- data/test/integration/tests/basic_computer_games/bullseye.input +10 -0
- data/test/integration/tests/basic_computer_games/bullseye.output +79 -0
- data/test/integration/tests/basic_computer_games/bunny.bas +40 -0
- data/test/integration/tests/basic_computer_games/bunny.input +0 -0
- data/test/integration/tests/basic_computer_games/bunny.output +67 -0
- data/test/integration/tests/basic_computer_games/buzzword.bas +25 -0
- data/test/integration/tests/basic_computer_games/buzzword.input +4 -0
- data/test/integration/tests/basic_computer_games/buzzword.output +25 -0
- data/test/integration/tests/basic_computer_games/calendar.bas +58 -0
- data/test/integration/tests/basic_computer_games/calendar.input +0 -0
- data/test/integration/tests/basic_computer_games/calendar.output +213 -0
- data/test/integration/tests/basic_computer_games/change.bas +51 -0
- data/test/integration/tests/basic_computer_games/change.input +4 -0
- data/test/integration/tests/basic_computer_games/change.output +28 -0
- data/test/integration/tests/basic_computer_games/checkers.bas +82 -0
- data/test/integration/tests/basic_computer_games/checkers.input +74 -0
- data/test/integration/tests/basic_computer_games/checkers.output +673 -0
- data/test/integration/tests/basic_computer_games/chemist.bas +27 -0
- data/test/integration/tests/basic_computer_games/chemist.input +11 -0
- data/test/integration/tests/basic_computer_games/chemist.output +54 -0
- data/test/integration/tests/basic_computer_games/chief.bas +51 -0
- data/test/integration/tests/basic_computer_games/chief.input +5 -0
- data/test/integration/tests/basic_computer_games/chief.output +19 -0
- data/test/integration/tests/basic_computer_games/chomp.bas +104 -0
- data/test/integration/tests/basic_computer_games/chomp.input +15 -0
- data/test/integration/tests/basic_computer_games/chomp.output +159 -0
- data/test/integration/tests/basic_computer_games/combat.bas +124 -0
- data/test/integration/tests/basic_computer_games/combat.input +7 -0
- data/test/integration/tests/basic_computer_games/combat.output +33 -0
- data/test/integration/tests/basic_computer_games/craps.bas +82 -0
- data/test/integration/tests/basic_computer_games/craps.input +9 -0
- data/test/integration/tests/basic_computer_games/craps.output +51 -0
- data/test/integration/tests/basic_computer_games/cube.bas +161 -0
- data/test/integration/tests/basic_computer_games/cube.input +25 -0
- data/test/integration/tests/basic_computer_games/cube.output +72 -0
- data/test/integration/tests/basic_computer_games/depthchg.bas +33 -0
- data/test/integration/tests/basic_computer_games/depthchg.input +16 -0
- data/test/integration/tests/basic_computer_games/depthchg.output +83 -0
- data/test/integration/tests/basic_computer_games/diamond.bas +27 -0
- data/test/integration/tests/basic_computer_games/diamond.input +1 -0
- data/test/integration/tests/basic_computer_games/diamond.output +65 -0
- data/test/integration/tests/basic_computer_games/dice.bas +31 -0
- data/test/integration/tests/basic_computer_games/dice.input +4 -0
- data/test/integration/tests/basic_computer_games/dice.output +46 -0
- data/test/integration/tests/basic_computer_games/digits.bas +78 -0
- data/test/integration/tests/basic_computer_games/digits.input +5 -0
- data/test/integration/tests/basic_computer_games/digits.output +70 -0
- data/test/integration/tests/basic_computer_games/evenwin1.bas +128 -0
- data/test/integration/tests/basic_computer_games/evenwin1.input +13 -0
- data/test/integration/tests/basic_computer_games/evenwin1.output +116 -0
- data/test/integration/tests/basic_computer_games/evenwin2.bas +70 -0
- data/test/integration/tests/basic_computer_games/evenwin2.input +14 -0
- data/test/integration/tests/basic_computer_games/evenwin2.output +56 -0
- data/test/integration/tests/basic_computer_games/flipflop.bas +79 -0
- data/test/integration/tests/basic_computer_games/flipflop.input +8 -0
- data/test/integration/tests/basic_computer_games/flipflop.output +45 -0
- data/test/integration/tests/basic_computer_games/footbal1.bas +298 -0
- data/test/integration/tests/basic_computer_games/footbal1.input +13 -0
- data/test/integration/tests/basic_computer_games/footbal1.output +315 -0
- data/test/integration/tests/basic_computer_games/footbal2.bas +181 -0
- data/test/integration/tests/basic_computer_games/footbal2.input +23 -0
- data/test/integration/tests/basic_computer_games/footbal2.output +318 -0
- data/test/integration/tests/basic_computer_games/furtradr.bas +170 -0
- data/test/integration/tests/basic_computer_games/furtradr.input +20 -0
- data/test/integration/tests/basic_computer_games/furtradr.output +133 -0
- data/test/integration/tests/basic_computer_games/golf.bas +244 -0
- data/test/integration/tests/basic_computer_games/golf.input +11 -0
- data/test/integration/tests/basic_computer_games/golf.output +69 -0
- data/test/integration/tests/basic_computer_games/gomoko.bas +54 -0
- data/test/integration/tests/basic_computer_games/gomoko.input +6 -0
- data/test/integration/tests/basic_computer_games/gomoko.output +66 -0
- data/test/integration/tests/basic_computer_games/guess.bas +40 -0
- data/test/integration/tests/basic_computer_games/guess.input +8 -0
- data/test/integration/tests/basic_computer_games/guess.output +37 -0
- data/test/integration/tests/basic_computer_games/gunner.bas +52 -0
- data/test/integration/tests/basic_computer_games/gunner.input +18 -0
- data/test/integration/tests/basic_computer_games/gunner.output +91 -0
- data/test/integration/tests/basic_computer_games/hamurabi.bas +119 -0
- data/test/integration/tests/basic_computer_games/hamurabi.input +7 -0
- data/test/integration/tests/basic_computer_games/hamurabi.output +51 -0
- data/test/integration/tests/basic_computer_games/hangman.bas +81 -0
- data/test/integration/tests/basic_computer_games/hangman.input +69 -0
- data/test/integration/tests/basic_computer_games/hangman.output +889 -0
- data/test/integration/tests/basic_computer_games/hello.bas +83 -0
- data/test/integration/tests/basic_computer_games/hello.input +7 -0
- data/test/integration/tests/basic_computer_games/hello.output +46 -0
- data/test/integration/tests/basic_computer_games/hexapawn.bas +174 -0
- data/test/integration/tests/basic_computer_games/hexapawn.input +38 -0
- data/test/integration/tests/basic_computer_games/hexapawn.output +521 -0
- data/test/integration/tests/basic_computer_games/hi-q.bas +135 -0
- data/test/integration/tests/basic_computer_games/hi-q.input +14 -0
- data/test/integration/tests/basic_computer_games/hi-q.output +115 -0
- data/test/integration/tests/basic_computer_games/hilo.bas +29 -0
- data/test/integration/tests/basic_computer_games/hilo.input +20 -0
- data/test/integration/tests/basic_computer_games/hilo.output +76 -0
- data/test/integration/tests/basic_computer_games/hockey.bas +210 -0
- data/test/integration/tests/basic_computer_games/hockey.input +59 -0
- data/test/integration/tests/basic_computer_games/hockey.output +243 -0
- data/test/integration/tests/basic_computer_games/horsrace.bas +130 -0
- data/test/integration/tests/basic_computer_games/horsrace.input +11 -0
- data/test/integration/tests/basic_computer_games/horsrace.output +517 -0
- data/test/integration/tests/basic_computer_games/hurkle.bas +51 -0
- data/test/integration/tests/basic_computer_games/hurkle.input +16 -0
- data/test/integration/tests/basic_computer_games/hurkle.output +81 -0
- data/test/integration/tests/basic_computer_games/kinema.bas +34 -0
- data/test/integration/tests/basic_computer_games/kinema.input +9 -0
- data/test/integration/tests/basic_computer_games/kinema.output +64 -0
- data/test/integration/tests/basic_computer_games/king.bas +268 -0
- data/test/integration/tests/basic_computer_games/king.input +7 -0
- data/test/integration/tests/basic_computer_games/king.output +57 -0
- data/test/integration/tests/basic_computer_games/lem.bas +246 -0
- data/test/integration/tests/basic_computer_games/lem.input +4 -0
- data/test/integration/tests/basic_computer_games/lem.output +68 -0
- data/test/integration/tests/basic_computer_games/letter.bas +26 -0
- data/test/integration/tests/basic_computer_games/letter.input +24 -0
- data/test/integration/tests/basic_computer_games/letter.output +123 -0
- data/test/integration/tests/basic_computer_games/life.bas +66 -0
- data/test/integration/tests/basic_computer_games/life.input +4 -0
- data/test/integration/tests/basic_computer_games/life.options +1 -0
- data/test/integration/tests/basic_computer_games/life.output +200 -0
- data/test/integration/tests/basic_computer_games/life2.bas +83 -0
- data/test/integration/tests/basic_computer_games/life2.input +17 -0
- data/test/integration/tests/basic_computer_games/life2.output +113 -0
- data/test/integration/tests/basic_computer_games/litquiz.bas +49 -0
- data/test/integration/tests/basic_computer_games/litquiz.input +4 -0
- data/test/integration/tests/basic_computer_games/litquiz.output +36 -0
- data/test/integration/tests/basic_computer_games/love.bas +34 -0
- data/test/integration/tests/basic_computer_games/love.input +1 -0
- data/test/integration/tests/basic_computer_games/love.output +67 -0
- data/test/integration/tests/basic_computer_games/lunar.bas +48 -0
- data/test/integration/tests/basic_computer_games/lunar.input +87 -0
- data/test/integration/tests/basic_computer_games/lunar.output +195 -0
- data/test/integration/tests/basic_computer_games/mastrmnd.bas +232 -0
- data/test/integration/tests/basic_computer_games/mastrmnd.input +18 -0
- data/test/integration/tests/basic_computer_games/mastrmnd.output +67 -0
- data/test/integration/tests/basic_computer_games/mathdice.bas +60 -0
- data/test/integration/tests/basic_computer_games/mathdice.input +4 -0
- data/test/integration/tests/basic_computer_games/mathdice.output +86 -0
- data/test/integration/tests/basic_computer_games/mugwump.bas +56 -0
- data/test/integration/tests/basic_computer_games/mugwump.input +16 -0
- data/test/integration/tests/basic_computer_games/mugwump.output +139 -0
- data/test/integration/tests/basic_computer_games/name.bas +25 -0
- data/test/integration/tests/basic_computer_games/name.input +2 -0
- data/test/integration/tests/basic_computer_games/name.output +22 -0
- data/test/integration/tests/basic_computer_games/nicoma.bas +34 -0
- data/test/integration/tests/basic_computer_games/nicoma.input +8 -0
- data/test/integration/tests/basic_computer_games/nicoma.output +36 -0
- data/test/integration/tests/basic_computer_games/nim.bas +156 -0
- data/test/integration/tests/basic_computer_games/nim.input +8 -0
- data/test/integration/tests/basic_computer_games/nim.output +30 -0
- data/test/integration/tests/basic_computer_games/number.bas +37 -0
- data/test/integration/tests/basic_computer_games/number.input +19 -0
- data/test/integration/tests/basic_computer_games/number.output +73 -0
- data/test/integration/tests/basic_computer_games/onecheck.bas +86 -0
- data/test/integration/tests/basic_computer_games/onecheck.input +6 -0
- data/test/integration/tests/basic_computer_games/onecheck.output +77 -0
- data/test/integration/tests/basic_computer_games/orbit.bas +96 -0
- data/test/integration/tests/basic_computer_games/orbit.input +10 -0
- data/test/integration/tests/basic_computer_games/orbit.output +113 -0
- data/test/integration/tests/basic_computer_games/pizza.bas +68 -0
- data/test/integration/tests/basic_computer_games/pizza.input +10 -0
- data/test/integration/tests/basic_computer_games/pizza.output +93 -0
- data/test/integration/tests/basic_computer_games/poetry.bas +42 -0
- data/test/integration/tests/basic_computer_games/poetry.input +0 -0
- data/test/integration/tests/basic_computer_games/poetry.options +1 -0
- data/test/integration/tests/basic_computer_games/poetry.output +50 -0
- data/test/integration/tests/basic_computer_games/poker.bas +416 -0
- data/test/integration/tests/basic_computer_games/poker.input +34 -0
- data/test/integration/tests/basic_computer_games/poker.output +197 -0
- data/test/integration/tests/basic_computer_games/queen.bas +168 -0
- data/test/integration/tests/basic_computer_games/queen.input +10 -0
- data/test/integration/tests/basic_computer_games/queen.output +133 -0
- data/test/integration/tests/basic_computer_games/reverse.bas +62 -0
- data/test/integration/tests/basic_computer_games/reverse.input +12 -0
- data/test/integration/tests/basic_computer_games/reverse.output +79 -0
- data/test/integration/tests/basic_computer_games/rocket.bas +71 -0
- data/test/integration/tests/basic_computer_games/rocket.input +42 -0
- data/test/integration/tests/basic_computer_games/rocket.output +149 -0
- data/test/integration/tests/basic_computer_games/rocksp.bas +33 -0
- data/test/integration/tests/basic_computer_games/rocksp.input +9 -0
- data/test/integration/tests/basic_computer_games/rocksp.output +69 -0
- data/test/integration/tests/basic_computer_games/roulette.bas +239 -0
- data/test/integration/tests/basic_computer_games/roulette.input +9 -0
- data/test/integration/tests/basic_computer_games/roulette.output +98 -0
- data/test/integration/tests/basic_computer_games/rusrou.bas +26 -0
- data/test/integration/tests/basic_computer_games/rusrou.input +9 -0
- data/test/integration/tests/basic_computer_games/rusrou.output +50 -0
- data/test/integration/tests/basic_computer_games/salvo.bas +329 -0
- data/test/integration/tests/basic_computer_games/salvo.input +21 -0
- data/test/integration/tests/basic_computer_games/salvo.output +49 -0
- data/test/integration/tests/basic_computer_games/sinewave.bas +17 -0
- data/test/integration/tests/basic_computer_games/sinewave.input +0 -0
- data/test/integration/tests/basic_computer_games/sinewave.output +168 -0
- data/test/integration/tests/basic_computer_games/slalom.bas +165 -0
- data/test/integration/tests/basic_computer_games/slalom.input +20 -0
- data/test/integration/tests/basic_computer_games/slalom.output +122 -0
- data/test/integration/tests/basic_computer_games/slots.bas +134 -0
- data/test/integration/tests/basic_computer_games/slots.input +2 -0
- data/test/integration/tests/basic_computer_games/slots.output +20 -0
- data/test/integration/tests/basic_computer_games/splat.bas +128 -0
- data/test/integration/tests/basic_computer_games/splat.input +9 -0
- data/test/integration/tests/basic_computer_games/splat.output +61 -0
- data/test/integration/tests/basic_computer_games/stars.bas +54 -0
- data/test/integration/tests/basic_computer_games/stars.input +15 -0
- data/test/integration/tests/basic_computer_games/stars.output +70 -0
- data/test/integration/tests/basic_computer_games/stock.bas +232 -0
- data/test/integration/tests/basic_computer_games/stock.input +30 -0
- data/test/integration/tests/basic_computer_games/stock.output +156 -0
- data/test/integration/tests/basic_computer_games/superstartrek.bas +425 -0
- data/test/integration/tests/basic_computer_games/superstartrek.input +21 -0
- data/test/integration/tests/basic_computer_games/superstartrek.output +151 -0
- data/test/integration/tests/basic_computer_games/superstartrekins.bas +127 -0
- data/test/integration/tests/basic_computer_games/superstartrekins.input +1 -0
- data/test/integration/tests/basic_computer_games/superstartrekins.output +134 -0
- data/test/integration/tests/basic_computer_games/synonym.bas +53 -0
- data/test/integration/tests/basic_computer_games/synonym.input +13 -0
- data/test/integration/tests/basic_computer_games/synonym.output +57 -0
- data/test/integration/tests/basic_computer_games/target.bas +51 -0
- data/test/integration/tests/basic_computer_games/target.input +2 -0
- data/test/integration/tests/basic_computer_games/target.output +39 -0
- data/test/integration/tests/basic_computer_games/tictac1.bas +69 -0
- data/test/integration/tests/basic_computer_games/tictac1.input +10 -0
- data/test/integration/tests/basic_computer_games/tictac1.output +49 -0
- data/test/integration/tests/basic_computer_games/tictac2.bas +114 -0
- data/test/integration/tests/basic_computer_games/tictac2.input +6 -0
- data/test/integration/tests/basic_computer_games/tictac2.output +104 -0
- data/test/integration/tests/basic_computer_games/towers.bas +125 -0
- data/test/integration/tests/basic_computer_games/towers.input +9 -0
- data/test/integration/tests/basic_computer_games/towers.output +70 -0
- data/test/integration/tests/basic_computer_games/train.bas +24 -0
- data/test/integration/tests/basic_computer_games/train.input +4 -0
- data/test/integration/tests/basic_computer_games/train.output +23 -0
- data/test/integration/tests/basic_computer_games/trap.bas +49 -0
- data/test/integration/tests/basic_computer_games/trap.input +7 -0
- data/test/integration/tests/basic_computer_games/trap.output +40 -0
- data/test/integration/tests/basic_computer_games/war.bas +68 -0
- data/test/integration/tests/basic_computer_games/war.input +11 -0
- data/test/integration/tests/basic_computer_games/war.output +54 -0
- data/test/integration/tests/basic_computer_games/weekday.bas +150 -0
- data/test/integration/tests/basic_computer_games/weekday.input +2 -0
- data/test/integration/tests/basic_computer_games/weekday.output +28 -0
- data/test/integration/tests/basic_computer_games/word.bas +65 -0
- data/test/integration/tests/basic_computer_games/word.input +6 -0
- data/test/integration/tests/basic_computer_games/word.output +0 -0
- data/test/integration/tests/fast/abs.bas +5 -0
- data/test/integration/tests/fast/abs.input +0 -0
- data/test/integration/tests/fast/abs.output +5 -0
- data/test/integration/tests/fast/add.bas +5 -0
- data/test/integration/tests/fast/add.input +0 -0
- data/test/integration/tests/fast/add.output +5 -0
- data/test/integration/tests/fast/and.bas +5 -0
- data/test/integration/tests/fast/and.input +0 -0
- data/test/integration/tests/fast/and.output +5 -0
- data/test/integration/tests/fast/array.bas +11 -0
- data/test/integration/tests/fast/array.input +0 -0
- data/test/integration/tests/fast/array.output +6 -0
- data/test/integration/tests/fast/asc.bas +1 -0
- data/test/integration/tests/fast/asc.input +0 -0
- data/test/integration/tests/fast/asc.output +1 -0
- data/test/integration/tests/fast/chr.bas +1 -0
- data/test/integration/tests/fast/chr.input +0 -0
- data/test/integration/tests/fast/chr.output +1 -0
- data/test/integration/tests/fast/cos.bas +1 -0
- data/test/integration/tests/fast/cos.input +0 -0
- data/test/integration/tests/fast/cos.output +1 -0
- data/test/integration/tests/fast/def_fn.bas +9 -0
- data/test/integration/tests/fast/def_fn.input +0 -0
- data/test/integration/tests/fast/def_fn.output +5 -0
- data/test/integration/tests/fast/divide.bas +5 -0
- data/test/integration/tests/fast/divide.input +0 -0
- data/test/integration/tests/fast/divide.output +5 -0
- data/test/integration/tests/fast/end.bas +3 -0
- data/test/integration/tests/fast/end.input +0 -0
- data/test/integration/tests/fast/end.output +1 -0
- data/test/integration/tests/fast/eq.bas +3 -0
- data/test/integration/tests/fast/eq.input +0 -0
- data/test/integration/tests/fast/eq.output +3 -0
- data/test/integration/tests/fast/exp.bas +2 -0
- data/test/integration/tests/fast/exp.input +0 -0
- data/test/integration/tests/fast/exp.output +2 -0
- data/test/integration/tests/fast/float.bas +3 -0
- data/test/integration/tests/fast/float.input +0 -0
- data/test/integration/tests/fast/float.output +2 -0
- data/test/integration/tests/fast/for_next.bas +61 -0
- data/test/integration/tests/fast/for_next.input +0 -0
- data/test/integration/tests/fast/for_next.output +46 -0
- data/test/integration/tests/fast/ge.bas +3 -0
- data/test/integration/tests/fast/ge.input +0 -0
- data/test/integration/tests/fast/ge.output +3 -0
- data/test/integration/tests/fast/gosub_return.bas +10 -0
- data/test/integration/tests/fast/gosub_return.input +0 -0
- data/test/integration/tests/fast/gosub_return.output +4 -0
- data/test/integration/tests/fast/goto.bas +3 -0
- data/test/integration/tests/fast/goto.input +0 -0
- data/test/integration/tests/fast/goto.output +1 -0
- data/test/integration/tests/fast/gt.bas +3 -0
- data/test/integration/tests/fast/gt.input +0 -0
- data/test/integration/tests/fast/gt.output +3 -0
- data/test/integration/tests/fast/if.bas +25 -0
- data/test/integration/tests/fast/if.input +0 -0
- data/test/integration/tests/fast/if.output +8 -0
- data/test/integration/tests/fast/input.bas +24 -0
- data/test/integration/tests/fast/input.input +10 -0
- data/test/integration/tests/fast/input.output +28 -0
- data/test/integration/tests/fast/int.bas +5 -0
- data/test/integration/tests/fast/int.input +0 -0
- data/test/integration/tests/fast/int.output +5 -0
- data/test/integration/tests/fast/integer_plus_string.bas +1 -0
- data/test/integration/tests/fast/integer_plus_string.input +0 -0
- data/test/integration/tests/fast/integer_plus_string.output +1 -0
- data/test/integration/tests/fast/invalid_argument.bas +1 -0
- data/test/integration/tests/fast/invalid_argument.input +0 -0
- data/test/integration/tests/fast/invalid_argument.output +1 -0
- data/test/integration/tests/fast/le.bas +3 -0
- data/test/integration/tests/fast/le.input +0 -0
- data/test/integration/tests/fast/le.output +3 -0
- data/test/integration/tests/fast/left.bas +1 -0
- data/test/integration/tests/fast/left.input +0 -0
- data/test/integration/tests/fast/left.output +1 -0
- data/test/integration/tests/fast/len.bas +2 -0
- data/test/integration/tests/fast/len.input +0 -0
- data/test/integration/tests/fast/len.output +2 -0
- data/test/integration/tests/fast/let.bas +6 -0
- data/test/integration/tests/fast/let.input +0 -0
- data/test/integration/tests/fast/let.output +4 -0
- data/test/integration/tests/fast/log.bas +1 -0
- data/test/integration/tests/fast/log.input +0 -0
- data/test/integration/tests/fast/log.output +1 -0
- data/test/integration/tests/fast/lt.bas +3 -0
- data/test/integration/tests/fast/lt.input +0 -0
- data/test/integration/tests/fast/lt.output +3 -0
- data/test/integration/tests/fast/math.output +0 -0
- data/test/integration/tests/fast/mid.bas +2 -0
- data/test/integration/tests/fast/mid.input +0 -0
- data/test/integration/tests/fast/mid.output +2 -0
- data/test/integration/tests/fast/multiply.bas +5 -0
- data/test/integration/tests/fast/multiply.input +0 -0
- data/test/integration/tests/fast/multiply.output +5 -0
- data/test/integration/tests/fast/ne.bas +3 -0
- data/test/integration/tests/fast/ne.input +0 -0
- data/test/integration/tests/fast/ne.output +3 -0
- data/test/integration/tests/fast/negate.bas +4 -0
- data/test/integration/tests/fast/negate.input +0 -0
- data/test/integration/tests/fast/negate.output +3 -0
- data/test/integration/tests/fast/not.bas +4 -0
- data/test/integration/tests/fast/not.input +0 -0
- data/test/integration/tests/fast/not.output +4 -0
- data/test/integration/tests/fast/on_goto.bas +6 -0
- data/test/integration/tests/fast/on_goto.input +0 -0
- data/test/integration/tests/fast/on_goto.output +2 -0
- data/test/integration/tests/fast/or.bas +5 -0
- data/test/integration/tests/fast/or.input +0 -0
- data/test/integration/tests/fast/or.output +5 -0
- data/test/integration/tests/fast/parentheses.bas +1 -0
- data/test/integration/tests/fast/parentheses.input +0 -0
- data/test/integration/tests/fast/parentheses.output +1 -0
- data/test/integration/tests/fast/power.bas +4 -0
- data/test/integration/tests/fast/power.input +0 -0
- data/test/integration/tests/fast/power.output +4 -0
- data/test/integration/tests/fast/print.bas +6 -0
- data/test/integration/tests/fast/print.input +0 -0
- data/test/integration/tests/fast/print.output +4 -0
- data/test/integration/tests/fast/read_data.bas +15 -0
- data/test/integration/tests/fast/read_data.input +0 -0
- data/test/integration/tests/fast/read_data.output +4 -0
- data/test/integration/tests/fast/rem.bas +1 -0
- data/test/integration/tests/fast/rem.input +0 -0
- data/test/integration/tests/fast/rem.output +0 -0
- data/test/integration/tests/fast/right.bas +1 -0
- data/test/integration/tests/fast/right.input +0 -0
- data/test/integration/tests/fast/right.output +1 -0
- data/test/integration/tests/fast/rnd.bas +5 -0
- data/test/integration/tests/fast/rnd.input +0 -0
- data/test/integration/tests/fast/rnd.output +5 -0
- data/test/integration/tests/fast/sgn.bas +5 -0
- data/test/integration/tests/fast/sgn.input +0 -0
- data/test/integration/tests/fast/sgn.output +5 -0
- data/test/integration/tests/fast/sin.bas +1 -0
- data/test/integration/tests/fast/sin.input +0 -0
- data/test/integration/tests/fast/sin.output +1 -0
- data/test/integration/tests/fast/sqr.bas +2 -0
- data/test/integration/tests/fast/sqr.input +0 -0
- data/test/integration/tests/fast/sqr.output +2 -0
- data/test/integration/tests/fast/stop.bas +3 -0
- data/test/integration/tests/fast/stop.input +0 -0
- data/test/integration/tests/fast/stop.output +2 -0
- data/test/integration/tests/fast/str.bas +3 -0
- data/test/integration/tests/fast/str.input +0 -0
- data/test/integration/tests/fast/str.output +3 -0
- data/test/integration/tests/fast/string_addition.bas +1 -0
- data/test/integration/tests/fast/string_addition.input +0 -0
- data/test/integration/tests/fast/string_addition.output +1 -0
- data/test/integration/tests/fast/string_comparisons.bas +7 -0
- data/test/integration/tests/fast/string_comparisons.input +0 -0
- data/test/integration/tests/fast/string_comparisons.output +4 -0
- data/test/integration/tests/fast/string_plus_integer.bas +1 -0
- data/test/integration/tests/fast/string_plus_integer.input +0 -0
- data/test/integration/tests/fast/string_plus_integer.output +1 -0
- data/test/integration/tests/fast/subtract.bas +5 -0
- data/test/integration/tests/fast/subtract.input +0 -0
- data/test/integration/tests/fast/subtract.output +5 -0
- data/test/integration/tests/fast/tab.bas +4 -0
- data/test/integration/tests/fast/tab.input +0 -0
- data/test/integration/tests/fast/tab.output +3 -0
- data/test/integration/tests/fast/tan.bas +1 -0
- data/test/integration/tests/fast/tan.input +0 -0
- data/test/integration/tests/fast/tan.output +1 -0
- data/test/integration/tests/fast/val.bas +3 -0
- data/test/integration/tests/fast/val.input +0 -0
- data/test/integration/tests/fast/val.output +3 -0
- data/test/spec/argument_checker_spec.rb +128 -0
- data/test/spec/basic_array_spec.rb +100 -0
- data/test/spec/basic_float_spec.rb +168 -0
- data/test/spec/basic_integer_spec.rb +270 -0
- data/test/spec/basic_numeric_spec.rb +16 -0
- data/test/spec/basic_object_spec.rb +22 -0
- data/test/spec/basic_string_spec.rb +259 -0
- data/test/spec/for_stack_spec.rb +70 -0
- data/test/spec/input_reader_spec.rb +143 -0
- data/test/spec/input_spec.rb +102 -0
- data/test/spec/line_spec.rb +18 -0
- data/test/spec/output_spec.rb +153 -0
- data/test/spec/parser_spec.rb +562 -0
- data/test/spec/program_spec.rb +45 -0
- data/test/spec/spec_helper.rb +15 -0
- data/test/spec/support/basic_numeric_helpers.rb +327 -0
- data/test/spec/support/basic_object_helpers.rb +22 -0
- data/test/spec/transcript_spec.rb +37 -0
- data/test/spec/transform_spec.rb +513 -0
- metadata +742 -0
@@ -0,0 +1,509 @@
|
|
1
|
+
BASKETBALL
|
2
|
+
CREATIVE COMPUTING MORRISTOWN, NEW JERSEY
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
THIS IS DARTMOUTH COLLEGE BASKETBALL. YOU WILL BE DARTMOUTH
|
7
|
+
CAPTAIN AND PLAYMAKER. CALL SHOTS AS FOLLOWS: 1. LONG
|
8
|
+
(30 FT.) JUMP SHOT; 2. SHORT (15 FT.) JUMP SHOT; 3. LAY
|
9
|
+
UP; 4. SET SHOT.
|
10
|
+
BOTH TEAMS WILL USE THE SAME DEFENSE. CALL DEFENSE AS
|
11
|
+
FOLLOWS: 6. PRESS; 6.5 MAN-TO MAN; 7. ZONE; 7.5 NONE.
|
12
|
+
TO CHANGE DEFENSE, JUST TYPE 0 AS YOUR NEXT SHOT.
|
13
|
+
YOUR STARTING DEFENSE WILL BE? 7
|
14
|
+
|
15
|
+
CHOOSE YOUR OPPONENT? YALE
|
16
|
+
CENTER JUMP
|
17
|
+
YALE CONTROLS THE TAP.
|
18
|
+
|
19
|
+
LAY UP.
|
20
|
+
SHOT IS MISSED.
|
21
|
+
YALE CONTROLS THE REBOUND.
|
22
|
+
PASS BACK TO YALE GUARD.
|
23
|
+
|
24
|
+
LAY UP.
|
25
|
+
SHOT IS MISSED.
|
26
|
+
YALE CONTROLS THE REBOUND.
|
27
|
+
LAY UP.
|
28
|
+
SHOT IS GOOD.
|
29
|
+
SCORE: 0 TO 2
|
30
|
+
|
31
|
+
YOUR SHOT? 1
|
32
|
+
JUMP SHOT
|
33
|
+
SHOT IS OFF TARGET.
|
34
|
+
REBOUND TO YALE
|
35
|
+
|
36
|
+
JUMP SHOT.
|
37
|
+
SHOT IS GOOD.
|
38
|
+
SCORE: 0 TO 4
|
39
|
+
|
40
|
+
YOUR SHOT? 2
|
41
|
+
JUMP SHOT
|
42
|
+
CHARGING FOUL. DARTMOUTH LOSES BALL.
|
43
|
+
|
44
|
+
LAY UP.
|
45
|
+
SHOT IS MISSED.
|
46
|
+
YALE CONTROLS THE REBOUND.
|
47
|
+
PASS BACK TO YALE GUARD.
|
48
|
+
|
49
|
+
LAY UP.
|
50
|
+
SHOT IS GOOD.
|
51
|
+
SCORE: 0 TO 6
|
52
|
+
|
53
|
+
YOUR SHOT? 3
|
54
|
+
LAY UP.
|
55
|
+
SHOT IS OFF THE RIM.
|
56
|
+
YALE CONTROLS THE REBOUND.
|
57
|
+
|
58
|
+
LAY UP.
|
59
|
+
SHOT IS MISSED.
|
60
|
+
YALE CONTROLS THE REBOUND.
|
61
|
+
PASS BACK TO YALE GUARD.
|
62
|
+
|
63
|
+
LAY UP.
|
64
|
+
SHOT IS MISSED.
|
65
|
+
YALE CONTROLS THE REBOUND.
|
66
|
+
LAY UP.
|
67
|
+
SHOT IS MISSED.
|
68
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
69
|
+
|
70
|
+
YOUR SHOT? 4
|
71
|
+
SET SHOT.
|
72
|
+
SHOT IS OFF THE RIM.
|
73
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
74
|
+
BALL PASSED BACK TO YOU.YOUR SHOT? 1
|
75
|
+
JUMP SHOT
|
76
|
+
SHOT IS GOOD.
|
77
|
+
SCORE: 2 TO 6
|
78
|
+
|
79
|
+
JUMP SHOT.
|
80
|
+
SHOT IS OFF RIM.
|
81
|
+
YALE CONTROLS THE REBOUND.
|
82
|
+
LAY UP.
|
83
|
+
SHOT IS GOOD.
|
84
|
+
SCORE: 2 TO 8
|
85
|
+
|
86
|
+
YOUR SHOT? 4
|
87
|
+
SET SHOT.
|
88
|
+
SHOT IS GOOD. TWO POINTS.
|
89
|
+
SCORE: 4 TO 8
|
90
|
+
|
91
|
+
LAY UP.
|
92
|
+
SHOT IS GOOD.
|
93
|
+
SCORE: 4 TO 10
|
94
|
+
|
95
|
+
YOUR SHOT? 3
|
96
|
+
LAY UP.
|
97
|
+
SHOT IS GOOD. TWO POINTS.
|
98
|
+
SCORE: 6 TO 10
|
99
|
+
|
100
|
+
JUMP SHOT.
|
101
|
+
SHOT IS GOOD.
|
102
|
+
SCORE: 6 TO 12
|
103
|
+
|
104
|
+
YOUR SHOT? 2
|
105
|
+
JUMP SHOT
|
106
|
+
SHOT IS GOOD.
|
107
|
+
SCORE: 8 TO 12
|
108
|
+
|
109
|
+
JUMP SHOT.
|
110
|
+
PLAYER FOULED. TWO SHOTS.
|
111
|
+
SHOOTER MAKES ONE SHOT AND MISSES ONE.
|
112
|
+
SCORE: 8 TO 13
|
113
|
+
|
114
|
+
YOUR SHOT? 1
|
115
|
+
JUMP SHOT
|
116
|
+
SHOT IS BLOCKED. BALL CONTROLLED BY YALE.
|
117
|
+
|
118
|
+
JUMP SHOT.
|
119
|
+
SHOT IS GOOD.
|
120
|
+
SCORE: 8 TO 15
|
121
|
+
|
122
|
+
YOUR SHOT? 2
|
123
|
+
JUMP SHOT
|
124
|
+
SHOT IS GOOD.
|
125
|
+
SCORE: 10 TO 15
|
126
|
+
|
127
|
+
JUMP SHOT.
|
128
|
+
SHOT IS OFF RIM.
|
129
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
130
|
+
|
131
|
+
YOUR SHOT? 0
|
132
|
+
YOUR NEW DEFENSIVE ALLIGNMENT IS? 7.5
|
133
|
+
|
134
|
+
YOUR SHOT? 1
|
135
|
+
JUMP SHOT
|
136
|
+
SHOT IS GOOD.
|
137
|
+
SCORE: 12 TO 15
|
138
|
+
|
139
|
+
LAY UP.
|
140
|
+
SHOT IS GOOD.
|
141
|
+
SCORE: 12 TO 17
|
142
|
+
|
143
|
+
YOUR SHOT? 3
|
144
|
+
LAY UP.
|
145
|
+
SHOT IS OFF THE RIM.
|
146
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
147
|
+
LAY UP.
|
148
|
+
SHOT IS OFF THE RIM.
|
149
|
+
YALE CONTROLS THE REBOUND.
|
150
|
+
|
151
|
+
LAY UP.
|
152
|
+
SHOT IS GOOD.
|
153
|
+
SCORE: 12 TO 19
|
154
|
+
|
155
|
+
YOUR SHOT? 2
|
156
|
+
JUMP SHOT
|
157
|
+
SHOT IS GOOD.
|
158
|
+
SCORE: 14 TO 19
|
159
|
+
|
160
|
+
LAY UP.
|
161
|
+
SHOT IS GOOD.
|
162
|
+
SCORE: 14 TO 21
|
163
|
+
|
164
|
+
YOUR SHOT? 4
|
165
|
+
SET SHOT.
|
166
|
+
SHOT IS OFF THE RIM.
|
167
|
+
YALE CONTROLS THE REBOUND.
|
168
|
+
|
169
|
+
LAY UP.
|
170
|
+
SHOT IS MISSED.
|
171
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
172
|
+
|
173
|
+
YOUR SHOT? 1
|
174
|
+
JUMP SHOT
|
175
|
+
SHOT IS BLOCKED. BALL CONTROLLED BY DARTMOUTH.
|
176
|
+
YOUR SHOT? 2
|
177
|
+
JUMP SHOT
|
178
|
+
SHOT IS BLOCKED. BALL CONTROLLED BY YALE.
|
179
|
+
|
180
|
+
LAY UP.
|
181
|
+
SHOT IS MISSED.
|
182
|
+
YALE CONTROLS THE REBOUND.
|
183
|
+
LAY UP.
|
184
|
+
SHOT IS MISSED.
|
185
|
+
YALE CONTROLS THE REBOUND.
|
186
|
+
LAY UP.
|
187
|
+
SHOT IS GOOD.
|
188
|
+
SCORE: 14 TO 23
|
189
|
+
|
190
|
+
YOUR SHOT? 3
|
191
|
+
LAY UP.
|
192
|
+
SHOT IS OFF THE RIM.
|
193
|
+
YALE CONTROLS THE REBOUND.
|
194
|
+
|
195
|
+
LAY UP.
|
196
|
+
SHOT IS GOOD.
|
197
|
+
SCORE: 14 TO 25
|
198
|
+
|
199
|
+
YOUR SHOT? 4
|
200
|
+
SET SHOT.
|
201
|
+
SHOT IS OFF THE RIM.
|
202
|
+
YALE CONTROLS THE REBOUND.
|
203
|
+
|
204
|
+
LAY UP.
|
205
|
+
SHOT IS MISSED.
|
206
|
+
YALE CONTROLS THE REBOUND.
|
207
|
+
LAY UP.
|
208
|
+
SHOT IS GOOD.
|
209
|
+
SCORE: 14 TO 27
|
210
|
+
|
211
|
+
YOUR SHOT? 4
|
212
|
+
SET SHOT.
|
213
|
+
SHOOTER FOULED. TWO SHOTS.
|
214
|
+
SHOOTER MAKES BOTH SHOTS.
|
215
|
+
SCORE: 16 TO 27
|
216
|
+
|
217
|
+
SET SHOT.
|
218
|
+
SHOT IS MISSED.
|
219
|
+
YALE CONTROLS THE REBOUND.
|
220
|
+
PASS BACK TO YALE GUARD.
|
221
|
+
|
222
|
+
SET SHOT.
|
223
|
+
SHOT IS GOOD.
|
224
|
+
SCORE: 16 TO 29
|
225
|
+
|
226
|
+
YOUR SHOT? 3
|
227
|
+
LAY UP.
|
228
|
+
SHOT IS GOOD. TWO POINTS.
|
229
|
+
SCORE: 18 TO 29
|
230
|
+
|
231
|
+
SET SHOT.
|
232
|
+
SHOT IS MISSED.
|
233
|
+
YALE CONTROLS THE REBOUND.
|
234
|
+
PASS BACK TO YALE GUARD.
|
235
|
+
|
236
|
+
JUMP SHOT.
|
237
|
+
SHOT IS OFF RIM.
|
238
|
+
YALE CONTROLS THE REBOUND.
|
239
|
+
LAY UP.
|
240
|
+
SHOT IS MISSED.
|
241
|
+
YALE CONTROLS THE REBOUND.
|
242
|
+
PASS BACK TO YALE GUARD.
|
243
|
+
|
244
|
+
JUMP SHOT.
|
245
|
+
SHOT IS OFF RIM.
|
246
|
+
YALE CONTROLS THE REBOUND.
|
247
|
+
PASS BACK TO YALE GUARD.
|
248
|
+
|
249
|
+
JUMP SHOT.
|
250
|
+
SHOT IS GOOD.
|
251
|
+
SCORE: 18 TO 31
|
252
|
+
|
253
|
+
YOUR SHOT? 3
|
254
|
+
LAY UP.
|
255
|
+
SHOT IS GOOD. TWO POINTS.
|
256
|
+
SCORE: 20 TO 31
|
257
|
+
|
258
|
+
***** END OF FIRST HALF *****
|
259
|
+
|
260
|
+
SCORE: DARTMOUTH: 20 YALE: 31
|
261
|
+
|
262
|
+
|
263
|
+
CENTER JUMP
|
264
|
+
YALE CONTROLS THE TAP.
|
265
|
+
|
266
|
+
SET SHOT.
|
267
|
+
SHOT IS MISSED.
|
268
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
269
|
+
|
270
|
+
YOUR SHOT? 2
|
271
|
+
JUMP SHOT
|
272
|
+
SHOT IS OFF TARGET.
|
273
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
274
|
+
BALL PASSED BACK TO YOU. YOUR SHOT? 1
|
275
|
+
JUMP SHOT
|
276
|
+
SHOT IS OFF TARGET.
|
277
|
+
REBOUND TO YALE
|
278
|
+
|
279
|
+
JUMP SHOT.
|
280
|
+
SHOT IS OFF RIM.
|
281
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
282
|
+
|
283
|
+
YOUR SHOT? 1
|
284
|
+
JUMP SHOT
|
285
|
+
SHOT IS OFF TARGET.
|
286
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
287
|
+
LAY UP.
|
288
|
+
SHOT IS GOOD. TWO POINTS.
|
289
|
+
SCORE: 22 TO 31
|
290
|
+
|
291
|
+
LAY UP.
|
292
|
+
SHOT IS GOOD.
|
293
|
+
SCORE: 22 TO 33
|
294
|
+
|
295
|
+
YOUR SHOT? 2
|
296
|
+
JUMP SHOT
|
297
|
+
SHOT IS OFF TARGET.
|
298
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
299
|
+
LAY UP.
|
300
|
+
SHOT IS OFF THE RIM.
|
301
|
+
YALE CONTROLS THE REBOUND.
|
302
|
+
|
303
|
+
SET SHOT.
|
304
|
+
SHOT IS MISSED.
|
305
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
306
|
+
|
307
|
+
YOUR SHOT? 2
|
308
|
+
JUMP SHOT
|
309
|
+
SHOT IS GOOD.
|
310
|
+
SCORE: 24 TO 33
|
311
|
+
|
312
|
+
JUMP SHOT.
|
313
|
+
SHOT IS OFF RIM.
|
314
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
315
|
+
|
316
|
+
YOUR SHOT? 3
|
317
|
+
LAY UP.
|
318
|
+
SHOT IS OFF THE RIM.
|
319
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
320
|
+
LAY UP.
|
321
|
+
SHOT IS OFF THE RIM.
|
322
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
323
|
+
BALL PASSED BACK TO YOU.YOUR SHOT? 3
|
324
|
+
LAY UP.
|
325
|
+
SHOT IS OFF THE RIM.
|
326
|
+
YALE CONTROLS THE REBOUND.
|
327
|
+
|
328
|
+
JUMP SHOT.
|
329
|
+
SHOT IS OFF RIM.
|
330
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
331
|
+
|
332
|
+
YOUR SHOT? 4
|
333
|
+
SET SHOT.
|
334
|
+
SHOT IS GOOD. TWO POINTS.
|
335
|
+
SCORE: 26 TO 33
|
336
|
+
|
337
|
+
LAY UP.
|
338
|
+
SHOT IS GOOD.
|
339
|
+
SCORE: 26 TO 35
|
340
|
+
|
341
|
+
YOUR SHOT? 4
|
342
|
+
SET SHOT.
|
343
|
+
SHOT IS OFF THE RIM.
|
344
|
+
YALE CONTROLS THE REBOUND.
|
345
|
+
|
346
|
+
JUMP SHOT.
|
347
|
+
SHOT IS OFF RIM.
|
348
|
+
YALE CONTROLS THE REBOUND.
|
349
|
+
PASS BACK TO YALE GUARD.
|
350
|
+
|
351
|
+
JUMP SHOT.
|
352
|
+
SHOT IS OFF RIM.
|
353
|
+
YALE CONTROLS THE REBOUND.
|
354
|
+
LAY UP.
|
355
|
+
SHOT IS MISSED.
|
356
|
+
YALE CONTROLS THE REBOUND.
|
357
|
+
PASS BACK TO YALE GUARD.
|
358
|
+
|
359
|
+
LAY UP.
|
360
|
+
SHOT IS MISSED.
|
361
|
+
YALE CONTROLS THE REBOUND.
|
362
|
+
PASS BACK TO YALE GUARD.
|
363
|
+
|
364
|
+
JUMP SHOT.
|
365
|
+
SHOT IS GOOD.
|
366
|
+
SCORE: 26 TO 37
|
367
|
+
|
368
|
+
YOUR SHOT? 1
|
369
|
+
JUMP SHOT
|
370
|
+
SHOOTER IS FOULED. TWO SHOTS.
|
371
|
+
SHOOTER MAKES ONE SHOT AND MISSES ONE.
|
372
|
+
SCORE: 27 TO 37
|
373
|
+
|
374
|
+
LAY UP.
|
375
|
+
SHOT IS MISSED.
|
376
|
+
YALE CONTROLS THE REBOUND.
|
377
|
+
PASS BACK TO YALE GUARD.
|
378
|
+
|
379
|
+
SET SHOT.
|
380
|
+
SHOT IS GOOD.
|
381
|
+
SCORE: 27 TO 39
|
382
|
+
|
383
|
+
YOUR SHOT? 2
|
384
|
+
JUMP SHOT
|
385
|
+
SHOT IS BLOCKED. BALL CONTROLLED BY YALE.
|
386
|
+
|
387
|
+
JUMP SHOT.
|
388
|
+
SHOT IS OFF RIM.
|
389
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
390
|
+
|
391
|
+
YOUR SHOT? 1
|
392
|
+
JUMP SHOT
|
393
|
+
SHOT IS GOOD.
|
394
|
+
SCORE: 29 TO 39
|
395
|
+
|
396
|
+
SET SHOT.
|
397
|
+
SHOT IS MISSED.
|
398
|
+
YALE CONTROLS THE REBOUND.
|
399
|
+
SET SHOT.
|
400
|
+
SHOT IS GOOD.
|
401
|
+
SCORE: 29 TO 41
|
402
|
+
|
403
|
+
YOUR SHOT? 1
|
404
|
+
JUMP SHOT
|
405
|
+
SHOT IS OFF TARGET.
|
406
|
+
REBOUND TO YALE
|
407
|
+
|
408
|
+
JUMP SHOT.
|
409
|
+
SHOT IS GOOD.
|
410
|
+
SCORE: 29 TO 43
|
411
|
+
|
412
|
+
YOUR SHOT? 1
|
413
|
+
JUMP SHOT
|
414
|
+
SHOOTER IS FOULED. TWO SHOTS.
|
415
|
+
SHOOTER MAKES BOTH SHOTS.
|
416
|
+
SCORE: 31 TO 43
|
417
|
+
|
418
|
+
JUMP SHOT.
|
419
|
+
SHOT IS OFF RIM.
|
420
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
421
|
+
|
422
|
+
YOUR SHOT? 1
|
423
|
+
JUMP SHOT
|
424
|
+
SHOT IS OFF TARGET.
|
425
|
+
REBOUND TO YALE
|
426
|
+
|
427
|
+
JUMP SHOT.
|
428
|
+
SHOT IS GOOD.
|
429
|
+
SCORE: 31 TO 45
|
430
|
+
|
431
|
+
YOUR SHOT? 2
|
432
|
+
JUMP SHOT
|
433
|
+
SHOT IS OFF TARGET.
|
434
|
+
REBOUND TO YALE
|
435
|
+
|
436
|
+
LAY UP.
|
437
|
+
SHOT IS MISSED.
|
438
|
+
YALE CONTROLS THE REBOUND.
|
439
|
+
PASS BACK TO YALE GUARD.
|
440
|
+
|
441
|
+
JUMP SHOT.
|
442
|
+
SHOT IS GOOD.
|
443
|
+
SCORE: 31 TO 47
|
444
|
+
|
445
|
+
YOUR SHOT? 2
|
446
|
+
JUMP SHOT
|
447
|
+
SHOT IS GOOD.
|
448
|
+
SCORE: 33 TO 47
|
449
|
+
|
450
|
+
LAY UP.
|
451
|
+
SHOT IS MISSED.
|
452
|
+
YALE CONTROLS THE REBOUND.
|
453
|
+
PASS BACK TO YALE GUARD.
|
454
|
+
|
455
|
+
JUMP SHOT.
|
456
|
+
SHOT IS GOOD.
|
457
|
+
SCORE: 33 TO 49
|
458
|
+
|
459
|
+
YOUR SHOT? 2
|
460
|
+
JUMP SHOT
|
461
|
+
SHOT IS GOOD.
|
462
|
+
SCORE: 35 TO 49
|
463
|
+
|
464
|
+
LAY UP.
|
465
|
+
SHOT IS MISSED.
|
466
|
+
YALE CONTROLS THE REBOUND.
|
467
|
+
PASS BACK TO YALE GUARD.
|
468
|
+
|
469
|
+
JUMP SHOT.
|
470
|
+
SHOT IS OFF RIM.
|
471
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
472
|
+
|
473
|
+
YOUR SHOT? 3
|
474
|
+
LAY UP.
|
475
|
+
SHOT IS OFF THE RIM.
|
476
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
477
|
+
LAY UP.
|
478
|
+
SHOT IS OFF THE RIM.
|
479
|
+
YALE CONTROLS THE REBOUND.
|
480
|
+
|
481
|
+
SET SHOT.
|
482
|
+
SHOT IS MISSED.
|
483
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
484
|
+
|
485
|
+
YOUR SHOT? 3
|
486
|
+
LAY UP.
|
487
|
+
SHOT IS OFF THE RIM.
|
488
|
+
DARTMOUTH CONTROLS THE REBOUND.
|
489
|
+
LAY UP.
|
490
|
+
SHOT IS GOOD. TWO POINTS.
|
491
|
+
SCORE: 37 TO 49
|
492
|
+
|
493
|
+
JUMP SHOT.
|
494
|
+
SHOT IS OFF RIM.
|
495
|
+
YALE CONTROLS THE REBOUND.
|
496
|
+
LAY UP.
|
497
|
+
SHOT IS MISSED.
|
498
|
+
YALE CONTROLS THE REBOUND.
|
499
|
+
PASS BACK TO YALE GUARD.
|
500
|
+
|
501
|
+
LAY UP.
|
502
|
+
SHOT IS GOOD.
|
503
|
+
SCORE: 37 TO 51
|
504
|
+
|
505
|
+
YOUR SHOT? 3
|
506
|
+
|
507
|
+
***** END OF GAME *****
|
508
|
+
FINAL SCORE: DARTMOUTH: 37 YALE: 51
|
509
|
+
Break in line 520
|
@@ -0,0 +1,90 @@
|
|
1
|
+
10 PRINT TAB(33);"BATNUM"
|
2
|
+
20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
|
3
|
+
30 PRINT:PRINT:PRINT
|
4
|
+
110 PRINT "THIS PROGRAM IS A 'BATTLE OF NUMBERS' GAME, WHERE THE"
|
5
|
+
120 PRINT "COMPUTER IS YOUR OPPONENT."
|
6
|
+
130 PRINT
|
7
|
+
140 PRINT "THE GAME STARTS WITH AN ASSUMED PILE OF OBJECTS. YOU"
|
8
|
+
150 PRINT "AND YOUR OPPONENT ALTERNATELY REMOVE OBJECTS FROM THE PILE."
|
9
|
+
160 PRINT "WINNING IS DEFINED IN ADVANCE AS TAKING THE LAST OBJECT OR"
|
10
|
+
170 PRINT "NOT. YOU CAN ALSO SPECIFY SOME OTHER BEGINNING CONDITIONS."
|
11
|
+
180 PRINT "DON'T USE ZERO, HOWEVER, IN PLAYING THE GAME."
|
12
|
+
190 PRINT "ENTER A NEGATIVE NUMBER FOR NEW PILE SIZE TO STOP PLAYING."
|
13
|
+
200 PRINT
|
14
|
+
210 GOTO 330
|
15
|
+
220 FOR I=1 TO 10
|
16
|
+
230 PRINT
|
17
|
+
240 NEXT I
|
18
|
+
330 INPUT "ENTER PILE SIZE";N
|
19
|
+
350 IF N>=1 THEN 370
|
20
|
+
360 GOTO 330
|
21
|
+
370 IF N<>INT(N) THEN 220
|
22
|
+
380 IF N<1 THEN 220
|
23
|
+
390 INPUT "ENTER WIN OPTION - 1 TO TAKE LAST, 2 TO AVOID LAST: ";M
|
24
|
+
410 IF M=1 THEN 430
|
25
|
+
420 IF M<>2 THEN 390
|
26
|
+
430 INPUT "ENTER MIN AND MAX ";A,B
|
27
|
+
450 IF A>B THEN 430
|
28
|
+
460 IF A<1 THEN 430
|
29
|
+
470 IF A<>INT(A) THEN 430
|
30
|
+
480 IF B<>INT(B) THEN 430
|
31
|
+
490 INPUT "ENTER START OPTION - 1 COMPUTER FIRST, 2 YOU FIRST ";S
|
32
|
+
500 PRINT:PRINT
|
33
|
+
510 IF S=1 THEN 530
|
34
|
+
520 IF S<>2 THEN 490
|
35
|
+
530 C=A+B
|
36
|
+
540 IF S=2 THEN 570
|
37
|
+
550 GOSUB 600
|
38
|
+
560 IF W=1 THEN 220
|
39
|
+
570 GOSUB 810
|
40
|
+
580 IF W=1 THEN 220
|
41
|
+
590 GOTO 550
|
42
|
+
600 Q=N
|
43
|
+
610 IF M=1 THEN 630
|
44
|
+
620 Q=Q-1
|
45
|
+
630 IF M=1 THEN 680
|
46
|
+
640 IF N>A THEN 720
|
47
|
+
650 W=1
|
48
|
+
660 PRINT "COMPUTER TAKES";N;"AND LOSES."
|
49
|
+
670 RETURN
|
50
|
+
680 IF N>B THEN 720
|
51
|
+
690 W=1
|
52
|
+
700 PRINT "COMPUTER TAKES";N;"AND WINS."
|
53
|
+
710 RETURN
|
54
|
+
720 P=Q-C*INT(Q/C)
|
55
|
+
730 IF P>=A THEN 750
|
56
|
+
740 P=A
|
57
|
+
750 IF P<=B THEN 770
|
58
|
+
760 P=B
|
59
|
+
770 N=N-P
|
60
|
+
780 PRINT "COMPUTER TAKES";P;"AND LEAVES";N
|
61
|
+
790 W=0
|
62
|
+
800 RETURN
|
63
|
+
810 PRINT:PRINT "YOUR MOVE ";
|
64
|
+
820 INPUT P
|
65
|
+
830 IF P<>0 THEN 870
|
66
|
+
840 PRINT "I TOLD YOU NOT TO USE ZERO! COMPUTER WINS BY FORFEIT."
|
67
|
+
850 W=1
|
68
|
+
860 RETURN
|
69
|
+
870 IF P<>INT(P) THEN 920
|
70
|
+
880 IF P>=A THEN 910
|
71
|
+
890 IF P=N THEN 960
|
72
|
+
900 GOTO 920
|
73
|
+
910 IF P<=B THEN 940
|
74
|
+
920 PRINT "ILLEGAL MOVE, REENTER IT ";
|
75
|
+
930 GOTO 820
|
76
|
+
940 N=N-P
|
77
|
+
950 IF N<>0 THEN 1030
|
78
|
+
960 IF M=1 THEN 1000
|
79
|
+
970 PRINT "TOUGH LUCK, YOU LOSE."
|
80
|
+
980 W=1
|
81
|
+
990 RETURN
|
82
|
+
1000 PRINT "CONGRATULATIONS, YOU WIN."
|
83
|
+
1010 W=1
|
84
|
+
1020 RETURN
|
85
|
+
1030 IF N>=0 THEN 1060
|
86
|
+
1040 N=N+P
|
87
|
+
1050 GOTO 920
|
88
|
+
1060 W=0
|
89
|
+
1070 RETURN
|
90
|
+
1080 END
|
@@ -0,0 +1,67 @@
|
|
1
|
+
BATNUM
|
2
|
+
CREATIVE COMPUTING MORRISTOWN, NEW JERSEY
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
THIS PROGRAM IS A 'BATTLE OF NUMBERS' GAME, WHERE THE
|
7
|
+
COMPUTER IS YOUR OPPONENT.
|
8
|
+
|
9
|
+
THE GAME STARTS WITH AN ASSUMED PILE OF OBJECTS. YOU
|
10
|
+
AND YOUR OPPONENT ALTERNATELY REMOVE OBJECTS FROM THE PILE.
|
11
|
+
WINNING IS DEFINED IN ADVANCE AS TAKING THE LAST OBJECT OR
|
12
|
+
NOT. YOU CAN ALSO SPECIFY SOME OTHER BEGINNING CONDITIONS.
|
13
|
+
DON'T USE ZERO, HOWEVER, IN PLAYING THE GAME.
|
14
|
+
ENTER A NEGATIVE NUMBER FOR NEW PILE SIZE TO STOP PLAYING.
|
15
|
+
|
16
|
+
ENTER PILE SIZE? 10
|
17
|
+
ENTER WIN OPTION - 1 TO TAKE LAST, 2 TO AVOID LAST: ? 1
|
18
|
+
ENTER MIN AND MAX ? 1,3
|
19
|
+
ENTER START OPTION - 1 COMPUTER FIRST, 2 YOU FIRST ? 1
|
20
|
+
|
21
|
+
|
22
|
+
COMPUTER TAKES 2 AND LEAVES 8
|
23
|
+
|
24
|
+
YOUR MOVE ? 1
|
25
|
+
COMPUTER TAKES 3 AND LEAVES 4
|
26
|
+
|
27
|
+
YOUR MOVE ? 3
|
28
|
+
COMPUTER TAKES 1 AND WINS.
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
ENTER PILE SIZE? 10
|
40
|
+
ENTER WIN OPTION - 1 TO TAKE LAST, 2 TO AVOID LAST: ? 2
|
41
|
+
ENTER MIN AND MAX ? 1,3
|
42
|
+
ENTER START OPTION - 1 COMPUTER FIRST, 2 YOU FIRST ? 2
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
YOUR MOVE ? 1
|
47
|
+
COMPUTER TAKES 1 AND LEAVES 8
|
48
|
+
|
49
|
+
YOUR MOVE ? 3
|
50
|
+
COMPUTER TAKES 1 AND LEAVES 4
|
51
|
+
|
52
|
+
YOUR MOVE ? 3
|
53
|
+
COMPUTER TAKES 1 AND LOSES.
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
ENTER PILE SIZE?
|
65
|
+
Too few items, try again
|
66
|
+
ENTER PILE SIZE?
|
67
|
+
Error on line 330: No more input
|