WesleyyC / Image-Editor

A command line image editor written in Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Brightness level parsing error.

WesleyyC opened this issue · comments

Enter command:
brighten
From 1-3, indicate the level of the brighten: 1
Getting pixel values from packed data...
Brighten.
Enter command:
command '' not found. Type 'help' for usage information.

input command fixed by reading the whole line and parse it as double.

add a error handler for the input, which should be a double between 1-3. But I use a try/catch recursive function and I am not sure if this is the right way to the in the real world. So @SerinaTan can you take a look at that function, doubleInput() in Editor.java? If it is good, you can close the ticket.

Add comment on the recursive call at the catch block. Keep the innovative but notice this is not industry standard.
Closing the ticket.