Skip to content

Commit

Permalink
Merge pull request #52 from Adrian400811/Jimmy
Browse files Browse the repository at this point in the history
Comments for each class
  • Loading branch information
349928465 authored Jun 13, 2024
2 parents dffbedd + 9b8d18c commit c172682
Show file tree
Hide file tree
Showing 26 changed files with 258 additions and 63 deletions.
6 changes: 6 additions & 0 deletions Bee.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import greenfoot.World;

/**
* Bee Class
*
* @author Adrian, Jason
* @version June 13 2024
*/
public abstract class Bee extends Mobs {
private final int hp;
private final int speed;
Expand Down
6 changes: 6 additions & 0 deletions BlueBee.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import greenfoot.World;

/**
* BlueBee Class
*
* @author Adrian, Jason
* @version June 13 2024
*/
public class BlueBee extends Bee {
private final int speed;
private final int range;
Expand Down
6 changes: 3 additions & 3 deletions Brick.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import greenfoot.GreenfootImage;

/**
* Write a description of class Block here.
* Block Class
*
* @author (your name)
* @version (a version number or a date)
* @author Adrian, Jimmy
* @version June 13 2024
*/
public class Brick extends Tile {
public Brick() {
Expand Down
6 changes: 3 additions & 3 deletions Button.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
* Write a description of class Button here.
* Button class for the game
*
* @author (your name)
* @version (a version number or a date)
* @author Jimmy
* @version June 13 2024
*/
public class Button extends Actor
{
Expand Down
12 changes: 7 additions & 5 deletions Coin.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import greenfoot.GreenfootImage;

/**
* Write a description of class Coin here.
* Coin class
*
* @author (your name)
* @version (a version number or a date)
* @author Jimmy, Daniel
* @version June 13 2024
*/
public class Coin extends Collection {
private final GreenfootImage image;

/**
* Constructor
*/
public Coin() {
image = new GreenfootImage("coin.png");
image.scale(45,45);
Expand All @@ -17,8 +20,7 @@ public Coin() {
}

/**
* Act - do whatever the Coin wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
* Act - if touching Player, remove coin and add it to the total coins
*/
public void act() {
if (isTouching(Player.class)) {
Expand Down
6 changes: 3 additions & 3 deletions Collection.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
* Write a description of class Collection here.
* Collection Class
*
* @author (your name)
* @version (a version number or a date)
* @author Daniel, Adrian, Jimmy
* @version June 13 2024
*/
public class Collection extends SuperSmoothMover
{
Expand Down
12 changes: 7 additions & 5 deletions Crown.java
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import greenfoot.GreenfootImage;

/**
* Write a description of class Crown here.
* Crown class
*
* @author (your name)
* @version (a version number or a date)
* @author Daniel
* @version June 13 2024
*/
public class Crown extends Collection {
private final GreenfootImage image;

/**
* Constructor
*/
public Crown() {
image = new GreenfootImage("crown.png");
image.scale(64, 64);
setImage(image);
}

/**
* Act - do whatever the Crown wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
* Act - Removes from world if touching Player and adds it to totalCrowns
*/
public void act() {
if (isTouching(Player.class)){
Expand Down
6 changes: 3 additions & 3 deletions Drone.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
* Write a description of class Drone here.
* Drone Class
*
* @author (your name)
* @version (a version number or a date)
* @author Daniel
* @version June 13 2024
*/
public class Drone extends FriendlyCreatures
{
Expand Down
6 changes: 3 additions & 3 deletions EndScreen.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
* Write a description of class EndScreen here.
* End Screen for the game
*
* @author (your name)
* @version (a version number or a date)
* @author Jimmy
* @version June 13 2024
*/
public class EndScreen extends World
{
Expand Down
6 changes: 6 additions & 0 deletions FloorHole.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

import java.util.List;

/**
* FloorHole class
*
* @author Adrian
* @version June 13 2024
*/
public class FloorHole extends Actor {
public FloorHole() {
GreenfootImage image = new GreenfootImage(1, 1);
Expand Down
6 changes: 3 additions & 3 deletions FriendlyCreatures.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
* Write a description of class FriendlyCreatures here.
* FriendlyCreatures Class
*
* @author (your name)
* @version (a version number or a date)
* @author Daniel
* @version June 13 2024
*/
public class FriendlyCreatures extends SuperSmoothMover
{
Expand Down
6 changes: 3 additions & 3 deletions GameOverScreen.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import greenfoot.*;

/**
* Write a description of class GameOverScreen here.
* Screen for when Player dies
*
* @author (your name)
* @version (a version number or a date)
* @author Jimmy
* @version June 13 2024
*/
public class GameOverScreen extends World {
private final Font font = new Font("Arial", 64);
Expand Down
6 changes: 6 additions & 0 deletions GreenBee.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* GreenBee Class
*
* @author Adrian, Jason
* @version June 13 2024
*/
public class GreenBee extends Bee {
private int speed;

Expand Down
6 changes: 6 additions & 0 deletions JumpBooster.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
import greenfoot.GreenfootImage;
import greenfoot.World;

/**
* JumpBooster Class
*
* @author Adrian
* @version June 13 2024
*/
public class JumpBooster extends Actor {
GreenfootImage image;

Expand Down
Loading

0 comments on commit c172682

Please sign in to comment.