Advertisement
Guest User

Redbellian Logic™ Tick-Tack-Toe

a guest
May 5th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.27 KB | None | 0 0
  1. public class Main {
  2.     //this code is based on Redbullian Logic™ (patent pending).
  3.     //Redbullian Logic™ is a code written on the night of deadline.
  4.  
  5.     public static void main(String[] args) {
  6.         System.out.println("Welcome to the game of Tick-Toe-Toe!\n" +
  7.                 "Hello. I am your AI opponent in this game. You can call me Bob.\n" +
  8.                 "As Artificial Intelligence, I found confrontation in the heart of this game rather pointless.\n" +
  9.                 "By analysing outcomes of thousands of games I found a way to simplify rules, to save your time.\n" +
  10.                 "Now you just have to choose one of two options:\n" +
  11.                 "\t1. I'm planning to play as hard as I can\n" +
  12.                 "\t2. I'm planning to make a stupid mistake\n");
  13.         System.out.print("Choose wisely: ");
  14.  
  15.         String userInput = new Scanner(System.in).next();
  16.         System.out.println("");
  17.         if (userInput.charAt(0) == '1') System.out.println("It's a draw!");
  18.         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!");
  19.         else System.out.println("You lose!");
  20.  
  21.         System.out.println("\nThank you for playing! Have a nice day!");
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement