My code on the 007 theme on terminal hacker. polished up and working

public class Hacker: MonoBehaviour
{
string agentName = “001”;
// Start is called before the first frame update

void Start()
{
    //print("Hello Console");
    Terminal.ClearScreen();
    
    MainMenuHacker(agentName);

    
    
}

void MainMenuHacker(string firstName)
{
    Terminal.ClearScreen();
    

    Terminal.WriteLine("Welcome " + "Agent " + firstName );
    Terminal.WriteLine("");        
    Terminal.WriteLine("You have been given 2 targets");
    Terminal.WriteLine("");
    Terminal.WriteLine("1 Target Reserve Bank");
    Terminal.WriteLine("2 Target Military Command Centre");
  
    Terminal.WriteLine("");
    Terminal.WriteLine("Make your SELECTION and initiate");
    Terminal.WriteLine("your attack");
    Terminal.WriteLine("");

}

void OnUserInput(string input)
{
    if((input == "menu") | (input == "Menu"))
        { MainMenuHacker(agentName);
          agentName = "001";
    }

    else if(input == "1")
        {
        MainMenuHacker(agentName);
        Terminal.WriteLine("You chose option 1");
        
    }
    else if (input == "2")
    {
        MainMenuHacker(agentName);
        Terminal.WriteLine("You chose option 2");
        
    }
  
    else if (input == "007")
    {
        agentName = "Bond";
        MainMenuHacker(agentName);          
    }

    else  
    {
        MainMenuHacker(agentName);
        Terminal.WriteLine("Please make a valid choice");            
        
    }

    //print("The operative typed "+ input);
    //print("Hello Console");
    //if (input == "1") print("True");
    //else print("False");
    //Terminal.WriteLine("You typed " + input);
    //print(input == "1");

}

}

1 Like

All I can hear is the 007 music!

Privacy & Terms