This project is based on Node.js + SQLite
--app.js
|-- bin
| `-- www
|-- db
| |-- O2ARC.db --> Our Main DB
| |-- db.js -->
| |-- dbin.js --> These two db__.js files intializeds DB. MUST NOT BE EXCUTED!
| |-- evaluation.json
| |-- logs.json
| |-- sql.js
| |-- tasklist.json
| `-- testsets.json --> backup json files
|-- package-lock.json
|-- package.json
|-- public
| |-- images
| | |-- background.png
| | `-- korea_mark.png
| |-- javascripts
| | |-- logic_function.js --> This js file contains backend logic functions.
| | `-- testing_interface.js
| `-- stylesheets
| |-- common.css
| |-- style.css
| `-- testing_interface.css
|-- routes --> SERVER LOGIC + DB LOGIC
| |-- index.js --> Main homepage routing
| |-- problemset.js --> Problem Set page routing
| `-- users.js
`-- views
|-- error.ejs --> 404 PAGE TEMPLATE
|-- index.ejs --> MAIN LOGIN PAGE TEMPLATE
`-- problem_set.ejs --> QUESTION SET SELECTION TEMPLATE
### Main Logic and Function Flow Chart
#hi
Current Data Structure.
If there not exist newly selected pixels, [],[]
will be inserted as a bounding box instead of [x_min, y_min], [x_max, y_max]
.
Tool | Operation | Info |
---|---|---|
Critical | CopyFromInput | []
|
ResizeGrid | [[H, W]]
| |
ResetGrid | ||
Submit | [succeed]
| |
Edit | Color | [[x, y], color]
|
Undo | []
| |
Redo | []
| |
Select | Fill | [[x_min, y_min], [x_max, y_max], color]
|
FlipX | [[x_min, y_min], [x_max, y_max]]
| |
FlipY | ||
RotateCW | ||
RotateCCW | ||
Move | [[x_min, y_min], [x_max, y_max], direction]
| |
Copy | [[x_min, y_min], [x_max, y_max], grid_source]
| |
Paste | [[x, y]]
| |
Flood fill | FloodFill | [[x, y], color]
|
Before Sep. 2023.
action_sequence
is a list of [Tool, Operation, Info, Grid]
. The possible combinations of each element are listed as a table below.
Grid
is 2D Array consist of numbers (0~9).succeed
is boolean value which indicates the submit was correct.direction
is one of "U", "D", "R", and "L".grid_source
indicates which source grid was copied. One of "Input Grid" and "Output Grid".x
is row index, andy
is column index. Be aware thatx
doesn't mean horizontal position.
Tool | Operation | Info |
---|---|---|
Critical | CopyFromInput | []
|
ResizeGrid | [[H, W]]
| |
ResetGrid | ||
Submit | [succeed]
| |
Edit | Color | [[x, y]]
|
Select | Fill | [[x_min, y_min], [x_max, y_max]]
|
FlipX | ||
FlipY | ||
RotateCW | ||
RotateCCW | ||
Move | [[x_min, y_min], [x_max, y_max], direction]
| |
Copy | [[x_min, y_min], [x_max, y_max], grid_source]
| |
Paste | [[x, y]]
| |
Flood fill | FloodFill | [[x, y]]
|