Introduction Quite recently a mobile game has gained much me

Introduction: Quite recently a mobile game has gained much media spotlight and popularity. The game involves walking around, capturing encountered wildlife by throwing balls at them, and setting them to fight against other animals (which have been captured) in morally shady animal battles. Its roots come from a story game in which a player collects monsters, raises them, and battles them against other monsters in over the top monster battles. Goal: Demonstrate coding techniques from lecture by the simulation of a potential real world application. Task: (500 pts) In this assignment, you will be responsible to simulate one aspect of the game mentioned above: The construction of the battling monsters and testing the abilities of that constructed monster. Requirements: Create a super class sub class relationship as we have demonstrated in class. Pick one specific monster from: http://pokemondb.net/pokedex/all Make fields with getters and setters for the Name, Type, and Base stats. Pick four abilities from that monster’s page. Write code to replicate its effect. Make a tester class to test each ability on a friendly test monster of your choosing. This helper monster does not need any methods. Just filled out stats so that your damage calculations can be observed. Ensure that there is detailed output so that I can see each of your methods functioning as intended. Hints: Make additional fields as needed, depending on your choices in this lab this will vary from person to person. Don’t forget to simulate the monster level in the stats. Look up how damage is calculated for higher accuracy in your simulation. Extra credit: There is an extra credit ceiling of an additional 500 points on this assignment. Document everything you do that is above and beyond the scope of this assignment to be considered. For example, you could modify your simulator to become a game by make it 2 players by using a scanner to record player input. If you did this, you would explain in documentation what you did, how much effort was involved, and why your addition is awesome!

Solution

import java.awt.*;
import java.applet.*;

public category Tank extends applications programme
purpose target;
   public int x, y, w, h;
   public int maxX=400,maxY=360,minX=0,minY=0;
   public int maxFire;   // the utmost quantity of shots allowed for the tank to fireside promptly
   public int gamma hydroxybutyrateShells;   // The max range of shells allowed to be pink-slipped
   public Boolean isMoving, isAlive, exploded;
   Graphics g;

   Tank()

   public Tank(int xpos, int ypos, Color c, int speed, int newDirection, int maxFire)

   public void move() else break;
       case EAST:   if( (x+tankWidth()+moveBy)>maxX) else break;
case SOUTH: if( (y+tankHeight()+moveBy)>maxY ) else break;
case WEST: if( (x-moveBy<minX) ) else break;
}
   }

   public void turn(int newDirection)

   public void turnAround()

   void explode()

   public void paint(Graphics gr)

       //polygon canon wheels
       int x11[] = ;
       int y11[] = ;

       int x12[] = ;
       int y12[] = ;

       int x13[] = x11;
       int y13[] = ;

       int x14[] = ;
       int y14[] = y12;

       int x1[][] = ;
       int y1[][] = ;

       //roundrect canon compartment
       int x2[] = ;
       int y2[] = ;

       //rect canon case
       int x3[] = ;
       int y3[] = ;
       int x3w[] = ;
       int y3h[] = ;

       //oval canon cap
       int x4[] = ;
       int y4[] = ;

       //canon
       int x5[] = ;
       int y5[] = ;
       int x5w[] = ;
       int y5h[] = ;

       int d = direction - 1;

       //draw wheels
       g.setColor(Color.black);
       g.fillPolygon(x1[d], y1[d] ,8);

       //draw compartment
       g.setColor(color);
       g.fillRoundRect(x2[d],y2[d],25,25,5,5);

       //draw canon
       g.setColor(Color.black);
       g.fillRect(x5[d],y5[d],x5w[d],y5h[d]);


       //draw canon case
       g.setColor(new Color(47,79,79));
       g.fillRect(x3[d],y3[d],x3w[d],y3h[d]);

       //draw canon cap      
       g.setColor(Color.black);
       g.fillOval(x4[d],y4[d],15,15);

   }

   int tankWidth()direction==3)return 35;
       else {return 40;
   }

   int tankHeight()come 35;
   }

}

Introduction: Quite recently a mobile game has gained much media spotlight and popularity. The game involves walking around, capturing encountered wildlife by t
Introduction: Quite recently a mobile game has gained much media spotlight and popularity. The game involves walking around, capturing encountered wildlife by t

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site