Skip to content
Snippets Groups Projects
Commit 485d3623 authored by Hakon.Molnes's avatar Hakon.Molnes
Browse files

Replace SimpleShell.java

parent 209a0413
Branches main
No related tags found
No related merge requests found
......@@ -52,8 +52,8 @@ public class SimpleShell implements CommandLineInterface {
//Implimentation of command-lin-Interface into our Shell-class
@Override
public void keyPressed(char key) {
public void aKeyIsPressed(char key) {
if (key == '\n') {
this.processCurrentCommandLine();
} else if (key >= ' ' && key <= '~') {
......@@ -64,8 +64,8 @@ public class SimpleShell implements CommandLineInterface {
}
@Override
public String getScreenContent() {
public String whatTheScreenLooksLike() {
String s = "";
for (String line : this.history) {
s += line;
......@@ -169,4 +169,17 @@ public class SimpleShell implements CommandLineInterface {
}
public void keyPressed(char key) {
aKeyIsPressed(key);
}
public String getScreenContent() {
return whatTheScreenLooksLike();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment