GenuineSounds

Robot Array

Aug 1st, 2011
231
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. package org.genuinesounds.src;
  2.  
  3. import org.genuinesounds.src.Robot;
  4.  
  5. public class DoRobot {
  6.    
  7.     public static void main(String[] args) {
  8.        
  9.         Robot players = new Robot("Brian", 5, 2, true);
  10.         players.displayRobot();
  11.        
  12.         Robot[] friends = new Robot[10];
  13.         for (int i = 0; i < 10; i++) {
  14.            
  15.             friends[i] = new Robot("random");
  16.             friends[i].displayRobot();
  17.            
  18.         }
  19.        
  20.         Robot[] enemies = new Robot[10];
  21.         for (int i = 0; i < 10; i++) {
  22.            
  23.             enemies[i] = new Robot("random");
  24.             enemies[i].displayRobot();
  25.            
  26.         }
  27.        
  28.         Robot.displayNumberOfRobots();
  29.        
  30.     }
  31.  
  32. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment