Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // The "AndrewEdwardWaynePocketmans" class.
- // December 7th, 2017
- // Pokemon game
- import java.awt.*;
- import hsa.Console;
- public class AndrewEdwardWaynePocketmans
- {
- static Console c; // The output console
- public static void main (String[] args)
- {
- c = new Console (30, 125); //sets the dimensions to 1000x600
- //Declares the fonts needed
- Font battle = new Font ("Agency FB", Font.BOLD, 22);
- Font dialog = new Font ("Agency FB", Font.BOLD, 30);
- Font button = new Font ("Agency FB", Font.BOLD, 40);
- //Declares the colors needed
- int savepoint = 0;
- //The code of the game
- while (true)
- {
- int x = 470, y = 244, area = 1, movement = 0, life = 1, sprint = 0;
- //game variables
- if (savepoint == 0)
- area = 1;
- //if (savepoint = 1)
- //area = 5
- while (life == 1)
- {
- //The HUD on the side
- c.fillRect (900, 0, 100, 600);
- c.setFont (button);
- c.drawString ("SPD", 910, 20);
- if (area == 1)
- {
- c.setColor (Color.green);
- c.fillOval (x, y, 19, 30);
- c.fillOval (x + 19, y - 10, 20, 40);
- c.fillOval (x + 39, y, 19, 30);
- c.setColor (Color.blue);
- c.fillOval (x - 2, y + 10, 60, 50);
- c.fillOval (x - 2, y + 50, 20, 15);
- c.fillOval (x + 38, y + 50, 20, 15);
- c.setColor (Color.pink);
- c.fillOval (x + 15, y + 26, 11, 8);
- c.fillOval (x + 35, y + 26, 11, 8);
- c.fillArc (x + 20, y + 29, 18, 24, 0, -180);
- }
- if (area == 2)
- {
- }
- if (area == 3)
- {
- }
- if (area == 4)
- {
- }
- if (area == 5)
- {
- }
- if (area == 6)
- {
- }
- if (area == 7)
- {
- }
- if (area == 8)
- {
- }
- if (area == 9)
- {
- }
- if (area == 10)
- {
- }
- if (area == 11)
- {
- }
- if (area == 12)
- {
- }
- if (area == 13)
- {
- }
- if (area == 14)
- {
- }
- if (area == 15)
- {
- }
- if (area == 16)
- {
- }
- if (area == 17)
- {
- }
- if (area == 18)
- {
- }
- if (area == 19)
- {
- }
- if (area == 20)
- {
- }
- //movement
- if (life == 1)
- movement = c.getChar ();
- if (movement == 'k')
- sprint += 1;
- //Changes the x or y position according to which key was pressed.
- if (sprint % 2 == 0)
- {
- if (movement == 'a')
- x = x - 6;
- if (movement == 'd')
- x = x + 6;
- if (movement == 'w')
- y = y - 6;
- if (movement == 's')
- y = y + 6;
- }
- if (sprint % 2 == 1)
- {
- if (movement == 'a')
- x = x - 12;
- if (movement == 'd')
- x = x + 12;
- if (movement == 'w')
- y = y - 12;
- if (movement == 's')
- y = y + 12;
- }
- //Interactions
- if (area == 1)
- {
- }
- if (area == 2)
- {
- }
- if (area == 3)
- {
- }
- if (area == 4)
- {
- }
- if (area == 5)
- {
- }
- if (area == 6)
- {
- }
- if (area == 7)
- {
- }
- if (area == 8)
- {
- }
- if (area == 9)
- {
- }
- if (area == 10)
- {
- }
- if (area == 11)
- {
- }
- if (area == 12)
- {
- }
- if (area == 13)
- {
- }
- if (area == 14)
- {
- }
- if (area == 15)
- {
- }
- if (area == 16)
- {
- }
- if (area == 17)
- {
- }
- if (area == 18)
- {
- }
- if (area == 19)
- {
- }
- if (area == 20)
- {
- }
- }
- }
- } // main method
- } // AndrewEdwardWaynePokemon class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement