Skip to content

Commit

Permalink
Merge pull request #64 from sudiptog81/merge-conflict-resolution-sudipto
Browse files Browse the repository at this point in the history
feat: Add Help Command to CLI
  • Loading branch information
pyymenta committed Oct 15, 2020
2 parents ce6315a + 390c6bf commit 508518d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
23 changes: 22 additions & 1 deletion dist/cli.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cli.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion src/cli.ts
Expand Up @@ -81,13 +81,35 @@ export default class CLI {
process.exit(1);
},
});

this.keyListener.bindEvent({
keyName: 'h',
handler: function () {
console.log(`
Start => Earth(0, 0)
Goal => Moon(0, 250)
Once Launched, the Ship moves Forward
W -> Increase Forward Speed
S -> Decrease Forward Speed
A -> Move Left
D -> Move Right
Max Speed - 5 speedunit
Min Speed - 1 speedunit (after leaving (0, 0))
Press H -> Show the Ship Reference Manual
Press CTRL + C to Exit
`);
}
});
}

start(): void {
console.log(Welcome);
console.log(Rocket);

this.output.write('(0, 0) ready for launch\n');
this.output.write('(0, 0) ready for launch\nPress H to Show Help\n');
}

launch(): void {
Expand Down

0 comments on commit 508518d

Please sign in to comment.