Advertisement
m0d52

RoboFight

Feb 10th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. import java.util.Random;
  2. class Robot {
  3.     int terminator;
  4.     int optimus;
  5.  
  6.     public void main(String[] args) {
  7.  
  8.         public void attack(int damage) {
  9.             Random random = new Random();
  10.             terminator = terminator + damage + random.nextInt(85 - 44);
  11.             optimus = optimus + damage + random.nextInt(85 - 44);
  12.         }
  13.  
  14.  
  15.     }
  16.  
  17.     public void Robofight()
  18.     {
  19.         System.out.println("Terminator " + terminator + " " + "Optimus " + optimus);
  20.     }
  21.  
  22.     public int getTerminator() {
  23.         return terminator;
  24.     }
  25.  
  26.     public int getOptimus() {
  27.         return optimus;
  28.     }
  29.  
  30. //    
  31. //    public Robot() {
  32. //
  33. //    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement