Git Product home page Git Product logo

alf-robot-language-public's People

Contributors

alexandruradovici avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alf-robot-language-public's Issues

5_extra tests

I have an issue with the tests from the 5_extra folder. When I try them, the output is shifted with either 1 or 2 pixels. I use Math.round as you said on the other issue regarding shifting that Catalin posted and my other tests that have TURN and FORWARD/BACKWARD work fine, but these 3 don't. Any idea where the problem is?

Spaces Error

Spaces

FORWARD 10

TURN left,20 // In vmchecker the output for this line is an error (no of param = 0). Is it correct?
BACKWARD 5
REPEAT 7
FORWARD 6
END

Repeat

Why is the first output from repeat the initial position?

output

when I run my program the output is just fine (without repeat) but it does not pass any test and I just don.t know why? can you please take a look and tell me what is going on?

Lots of statements

Question

Verifying Lots of statements results with error.
I have stored all the output in a text file and when I compared the output file with the expected output (repeat.s.out) I got a full match.
I used the plugin compare from notepad++.
Any hints on what might be wrong?

Error while reading

I uploaded the archive.zip into vmchecker, and it says "Eroare la citire" for all the tests. When i run the program in the console i write "node main.js robot_commands.s", supposing that the file "robot_commands.s" is the source file where all the commands are stored. Can you please explain why it gives me that error?

EDIT: fixed it.

Parameters number error

Question

For the TURN parameters error we have on the homework page:
ERROR LINE (line_number): TURN has 2 parameters, your wrote (number_of_written_parameters)
but on vmchecker it is expected:
ERROR LINE (line_number): TURN has 2 parametres, your wrote (number_of_written_parameters)

It should be parameters instead of parametres.

REPEAT 0 ERRORS

If the REPEAT function if supposed to repeat for "X" number of times everything until it reaches an END command, then why it displays an error when it repeats 0 times?
<<# Repeat 0 with error
REPEAT 0
FORWARD 10
TEXT
END>>

<<OK 0, 0, 90
ERROR LINE 4: Unknown command TEXT>>

Line number

If in the commands file of the robot i have an empty row, should my code skip it like its not there or keep it in memory so that the number of the error in the commands file is the same printed by the console?

Ex: alf-robot-language-public/verify/robot/2_jump/jump_error.s

"# Jump error

turn right, 8
forward 8
jump ,0

turn right, 352
"

Output: alf-robot-language-public/verify/robot/2_jump/jump_error.s.out
"OK 0, 0, 82
OK 8, 1, 82
ERROR LINE 4: jump parameter 1 requires a number or ~, you wrote
OK 8, 1, 90"

Understanding the example

Question

The example :

"& Move //so i guess this line is a comment
POSITION 200, 200 //which makes this line 1
COMMAND_WITH_ERROR // line 2
LINE position 300, 350 // line 3" --> this is the example that you gave(with some of my notes) and the error is: "ERROR LINE 2: Unknown statement STATEMENT_WITH_ERROR" ( example that makes me belive that the lines 1 and 3 are fine considering the "intentional" error on line 2..or am I wrong?)

assuming that so far I got it right..later in the instructions I found the format of a valid statement:
" STATEMENT : parameter1 parameter2 etc" , which makes all the 3 lines in the example wrong :
line 1 : missing ":"
line 3 : also missing ":" and a second statement on the same line ("position") which is not even uppercased; assuming it's a parameter it should be a variable (but it's still an error because it has not been declared first and it's bad format..it should be %position)

also, later in the instructions i come upon this format :
position > 150 150
position > %here %there --> with %here and %there variables previously decalred ; still no ":" but here i find ">" ..is this still a valid format? also the statement(position) is still not uppercased, and it's mentioned in the instructions that everything is case sensitive

FInally my questions:

  1. Are all the 3 lines in the example wrong?
  2. Is this not the only valid format of a line: " STATEMENT : parameter1 parameter2 etc"?(is ":" optional? or maybe there can be more statements on the line..?)?
  3. If there is something i misunderstood please point it out

Thank you

More Repeat

Can you please check if the MORE_REPEAT test is ok? Because my program passes other tests from the bonus, but with this one, my (x,y) are shifted with 3 pixels, but the angle is good and i don't understand where the error comes from.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.