citic / botNeumann

A metaphorized and gamified visualization of the von Neumann architecture for programming learning
1 stars 0 forks source link

Unit editor (Create) #156

Open jeissonh opened 7 years ago

jeissonh commented 7 years ago

When user presses the Create button, the UnitSelectionScene shows the units created by the player. The last unit is disabled with a big "+" sign inside. When pressed it creates a new Unit. When pressing for a few seconds an existing Unit, a "-" button appears and when pressed asks confirmation to delete the Unit.

When pressing a unit the UnitPlayingScene appears in edit mode. User has access to the Unit Editor dock. This is a complex dock that allows user to edit each element and attribute of the Botnu XML specification.

When a source file or directory is dropped over botNeumann, or the "Open with" option is used in the file explorer of an operating system where botNeumann is installed, the application runs and enters in the UnitPlayingScene showing the Unit Editor dock. The dropped or selected source files are shown in the CodeEditor. User is able to create a temporary Unit for running his/her code. User has the option to save the temporary Unit to his/her directory of created Units (suggestion: in "$HOME/Documents/botNeumann" folder).

Directories are special. When dropped or "Open with", botNeumann looks for special files (ignoring case):

name.botnu
    An XML file containing everything or referring the rest of files if they exist

problem.nl.html|xhtml|.md|.adoc?
    Problem description in natural language nl

initial*.pl
    Initial code in programming language pl (c or cpp) Ej: "initial01.c"

solution*.pl
    A given solution to the problem in programming language pl

generator*.pl | sgenerator*.pl
    A standard generator of test cases in programming language pl

fgenerator*.pl
    A file generator of test cases in programming language pl

nn_input.txt
nn_output_ex.txt
nn_error_ex.txt
nn_args.txt
    A literal test case

*.pl
    Any other file in programming language pl is considered player solution code

botNeumann expects all these files be prefixed by "bn_", but this restriction may be relaxed in order to increase readability of file names for user.