Added cases for all the commands that will be implemented for now. Updated Server class to contain information about servers, home computer, etc. Added a few fields to Server that will be used when hacking, as well as constructor.

This commit is contained in:
Daniel Xie
2016-10-17 16:23:23 -05:00
parent 7c03b274d7
commit a1fd46232e
4 changed files with 117 additions and 38 deletions
+3 -19
View File
@@ -87,6 +87,7 @@ var Engine = {
loadTerminalContent: function() {
Engine.hideAllContent();
Engine.Display.terminalContent.style.visibility = "visible";
post("Netburner v1.0");
},
loadCharacterContent: function() {
@@ -108,7 +109,8 @@ var Engine = {
'Strength: ' + Player.strength + '<br><br>' +
'Defense: ' + Player.defense + '<br><br>' +
'Dexterity: ' + Player.dexterity + '<br><br>' +
'Agility: ' + Player.agility + '<br><br>';
'Agility: ' + Player.agility + '<br><br>' +
'Servers owned: ' + Player.purchasedServers.length + <br><br>';
},
/* Main Event Loop */
@@ -139,24 +141,6 @@ var Engine = {
/* Initialization */
init: function() {
//Hacking button
//Engine.Clickables.hackButton = document.getElementById("hackbutton");
//Event Listener for hacking button
//Engine.Clickables.hackButton.addEventListener("click", function() {
// ++Player.hacking_skill;
//Returns false so that once the code runs, the button won't try to do
//anything else
// return false;
//});
//Hacking Skill Display
//Engine.Display.hacking_skill = document.getElementById("hackingskill");
//Status display
//Engine.Display.statusText = document.getElementById("status");
//Load, save, and delete buttons
//Engine.Clickables.saveButton = document.getElementById("save");
//Engine.Clickables.saveButton.addEventListener("click", function() {