Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- class Robot {
- int terminator;
- int optimus;
- public void main(String[] args) {
- public void attack(int damage) {
- Random random = new Random();
- terminator = terminator + damage + random.nextInt(85 - 44);
- optimus = optimus + damage + random.nextInt(85 - 44);
- }
- }
- public void Robofight()
- {
- System.out.println("Terminator " + terminator + " " + "Optimus " + optimus);
- }
- public int getTerminator() {
- return terminator;
- }
- public int getOptimus() {
- return optimus;
- }
- //
- // public Robot() {
- //
- // }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement