Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- //this code is based on Redbullian Logic™ (patent pending).
- //Redbullian Logic™ is a code written on the night of deadline.
- public static void main(String[] args) {
- System.out.println("Welcome to the game of Tick-Toe-Toe!\n" +
- "Hello. I am your AI opponent in this game. You can call me Bob.\n" +
- "As Artificial Intelligence, I found confrontation in the heart of this game rather pointless.\n" +
- "By analysing outcomes of thousands of games I found a way to simplify rules, to save your time.\n" +
- "Now you just have to choose one of two options:\n" +
- "\t1. I'm planning to play as hard as I can\n" +
- "\t2. I'm planning to make a stupid mistake\n");
- System.out.print("Choose wisely: ");
- String userInput = new Scanner(System.in).next();
- System.out.println("");
- if (userInput.charAt(0) == '1') System.out.println("It's a draw!");
- else if (userInput.charAt(0) != '2') System.out.println("Looks like you can't follow even a simplest rules. You defaulted to Option 2.\nYou lose!");
- else System.out.println("You lose!");
- System.out.println("\nThank you for playing! Have a nice day!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement