Skip to content

Commit

Permalink
Fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-j committed Dec 2, 2016
1 parent c50dc97 commit d7d6127
Show file tree
Hide file tree
Showing 13 changed files with 893 additions and 893 deletions.
2 changes: 1 addition & 1 deletion src/edu/ucsb/cs56/projects/games/roguelike/Beef.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Beef(boolean use){
this.setIcon('+');
}

/**
/**
this method uses the effect value in someway.
in this method it just adds attack points to the player
*/
Expand Down
24 changes: 12 additions & 12 deletions src/edu/ucsb/cs56/projects/games/roguelike/Elixir.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
import java.util.Random;

/**
@author Ishjot Walia & Josue Montenegro
@version cs56 Winter 16
This class represents a class of Item called a Elixir which increases the Player's speed, allowing them to move 2 spaces instead of 1.
This item is very rare.
its in game icon is E
*/
@author Ishjot Walia & Josue Montenegro
@version cs56 Winter 16
This class represents a class of Item called a Elixir which increases the Player's speed, allowing them to move 2 spaces instead of 1.
This item is very rare.
its in game icon is E
*/

public class Elixir extends Item{
private char icon;

/**
default consturctor for Elixir
its default value is 1; with icon S
default consturctor for Elixir
its default value is 1; with icon S
*/
public Elixir(){
super(1);
Expand All @@ -25,15 +25,15 @@ public Elixir(){
/**
* this is an 1 arg consrtuctor that will set whether the item has been used or not
* @param use is the param to set the use state of the item to true or false.
*/
*/
public Elixir(boolean use){
super(use);
this.setIcon('S');
}

/**
this method uses the effect value in someway.
in this method it adds the speed value to the player.
/**
this method uses the effect value in someway.
in this method it adds the speed value to the player.
*/
@Override public void UseEffect(Player p){
p.setSpeed(p.getSpeed()+this.getEffect());
Expand Down
2 changes: 1 addition & 1 deletion src/edu/ucsb/cs56/projects/games/roguelike/GUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void actionPerformed(ActionEvent e)
{
System.exit(0);
}
});
});

guiFrame.add(playButton);
guiFrame.add(instrButton);
Expand Down
48 changes: 24 additions & 24 deletions src/edu/ucsb/cs56/projects/games/roguelike/GamePieceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,44 @@
public class GamePieceTest{

/** this tests that the monster constructor works and the type should be monster
with icon M
*/
with icon M
*/
@Test public void test_defaultMonsterType_Constructor(){
Monster m=new Monster();
assertEquals("monster",m.getTypeOfPiece());
assertEquals('M',m.getIcon());
}

/** this tests that the player constructor works and the type should be player
with icon @
*/
with icon @
*/
@Test public void test_defaultPlayerType_Constructor(){
Player p=new Player();
assertEquals("player",p.getTypeOfPiece());
assertEquals('@',p.getIcon());
}

/** this test that the Bat constructor works and is a Monster type
with icon B
*/
with icon B
*/
@Test public void test_defaulBatType_Constructor(){
Bat b=new Bat();
assertEquals("monster",b.getTypeOfPiece());
assertEquals('B',b.getIcon());
}

/** this test that the Golem constructor works and is a Monster type
with icon G
*/
with icon G
*/
@Test public void test_defaultGolemType_Constructor(){
Golem g=new Golem();
assertEquals("monster",g.getTypeOfPiece());
assertEquals('G',g.getIcon());
}

/** this test that the Troll constructor works and is a Monster type
with icon T
*/
with icon T
*/
@Test public void test_defaultTrollType_Constructor(){
Troll t=new Troll();
assertEquals("monster",t.getTypeOfPiece());
Expand Down Expand Up @@ -89,8 +89,8 @@ public class GamePieceTest{


/**tests the monsters 3arg Constructor to see if it is still a Monster Type
with icon M
*/
with icon M
*/
@Test public void test_3ArgConstructorMonster(){
Monster m=new Monster(1,2,0);
assertEquals("monster",m.getTypeOfPiece());
Expand All @@ -99,7 +99,7 @@ public class GamePieceTest{

/**tests the Bat 3arg Constructor to see if it is still a Monster Type
with icon B
*/
*/
@Test public void test_3ArgConstructorBat(){
Bat m=new Bat(1,2,0);
assertEquals("monster",m.getTypeOfPiece());
Expand All @@ -108,7 +108,7 @@ public class GamePieceTest{

/**tests the Golem 3arg Constructor to see if it is still a Monster Type
with icon G
*/
*/
@Test public void test_3ArgConstructorGolem(){
Golem m=new Golem(1,2,0);
assertEquals("monster",m.getTypeOfPiece());
Expand All @@ -124,7 +124,7 @@ public class GamePieceTest{

/**test the Snake 3arg Constructor to see if it is still a Monster Type
with icon S
*/
*/
@Test public void test_3ArgConstructorSnake(){
Snake s = new Snake(1,2,0);
assertEquals("monster",s.getTypeOfPiece());
Expand All @@ -133,7 +133,7 @@ public class GamePieceTest{

/**test the Zombie 3arg Constructor to see if it is still a Monster Type
with icon Z
*/
*/
@Test public void test_3ArgConstructorZombie(){
Zombie z = new Zombie(1,2,0);
assertEquals("monster",z.getTypeOfPiece());
Expand All @@ -142,7 +142,7 @@ public class GamePieceTest{

/**test the Pirate 3arg Constructor to see if it is still a Monster Type
with icon P
*/
*/
@Test public void test_3ArgConstructorPirate(){
Pirate p = new Pirate(1,2,0);
assertEquals("monster",p.getTypeOfPiece());
Expand All @@ -151,8 +151,8 @@ public class GamePieceTest{


/**tests the Monster 4arg Constructor to see if it is still a Monster Type
with icon M
*/
with icon M
*/
@Test public void test_4argConstructorMonsterType(){
Monster b=new Monster(1,2,0,3);
assertEquals("monster",b.getTypeOfPiece());
Expand All @@ -161,8 +161,8 @@ public class GamePieceTest{
}

/**tests the Bat 4arg Constructor to see if it is still a Monster Type
with icon B
*/
with icon B
*/
@Test public void test_4argConstructorBatType(){
Bat b=new Bat(1,2,0,3);
assertEquals("monster",b.getTypeOfPiece());
Expand All @@ -171,16 +171,16 @@ public class GamePieceTest{

/**tests the Golem 4arg Constructor to see if it is still a Monster Type
with icon G
*/
*/
@Test public void test_4argConstructorGolemType(){
Golem b=new Golem(1,2,0,3);
assertEquals("monster",b.getTypeOfPiece());
assertEquals('G',b.getIcon());
}

/**tests the Troll 4arg Constructor to see if it is still a Monster Type
with icon T
*/
with icon T
*/
@Test public void test_4argConstructorTrollType(){
Troll b=new Troll(1,2,0,3);
assertEquals("monster",b.getTypeOfPiece());
Expand Down
12 changes: 6 additions & 6 deletions src/edu/ucsb/cs56/projects/games/roguelike/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import java.util.Random;

/**
* An Item class to represent Items in the Dungeon.
*@author Hans Marasigan & Richard Nguyen
*@version cs56 s13
*/
* An Item class to represent Items in the Dungeon.
*@author Hans Marasigan & Richard Nguyen
*@version cs56 s13
*/


public class Item implements GamePiece{
Expand Down Expand Up @@ -58,8 +58,8 @@ public Item(boolean CanUse){
gets the item's effect value
*/
public int getEffect(){
return this.effect;
}
return this.effect;
}
/**
sets the item's effect value
@param NewEffect this is the value the computer/programmer can set
Expand Down
84 changes: 42 additions & 42 deletions src/edu/ucsb/cs56/projects/games/roguelike/ItemTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import static org.junit.Assert.assertFalse;

/** test class for my Item class
@author Hans Marasigan & Richard Nguyen
@version cs56 S13
@see Item
@author Hans Marasigan & Richard Nguyen
@version cs56 S13
@see Item
*/

public class ItemTest{
Expand Down Expand Up @@ -64,7 +64,7 @@ public class ItemTest{
assertEquals(true,i.getUse());
assertEquals("gameitem",i.getTypeOfPiece());
}
/**
/**
this tests the default constructor.
the effect should be 10 and used is false and it is an item
and has icon H
Expand Down Expand Up @@ -115,7 +115,7 @@ public class ItemTest{
assertEquals(true,i.getUse());
assertEquals("gameitem",i.getTypeOfPiece());
}
/**
/**
this tests the default constructor.
the effect should be 20 and used is false and it is an item
and has icon !
Expand Down Expand Up @@ -166,7 +166,7 @@ public class ItemTest{
assertEquals(true,i.getUse());
assertEquals("gameitem",i.getTypeOfPiece());
}
/**
/**
this tests the default constructor.
the effect should be 20 and used is false and it is an item
and has icon +
Expand Down Expand Up @@ -217,45 +217,45 @@ public class ItemTest{
assertEquals(true,i.getUse());
assertEquals("gameitem",i.getTypeOfPiece());
}
/**
this tests how an Item affects a player
*/
@Test public void test_itemOnPlayer(){
Item i= new Item();
Player p=new Player();
i.UseEffect(p);
assertEquals(10,p.getScore());
}
/**
this tests how an Item affects a player
*/
@Test public void test_itemOnPlayer(){
Item i= new Item();
Player p=new Player();
i.UseEffect(p);
assertEquals(10,p.getScore());
}

/**
this tests how a HealthPotion affects a player
*/
@Test public void test_HealthPotionOnPlayer(){
HealthPotion i= new HealthPotion();
Player p=new Player();
i.UseEffect(p);
assertEquals(120,p.getHitPoints());
}
/**
this tests how a HealthPotion affects a player
*/
@Test public void test_HealthPotionOnPlayer(){
HealthPotion i= new HealthPotion();
Player p=new Player();
i.UseEffect(p);
assertEquals(120,p.getHitPoints());
}

/**
this tests how a Poison affects a player
*/
@Test public void test_PoisonOnPlayer(){
Poison i= new Poison();
Player p=new Player();
i.UseEffect(p);
assertEquals(80,p.getHitPoints());
}
/**
this tests how a Poison affects a player
*/
@Test public void test_PoisonOnPlayer(){
Poison i= new Poison();
Player p=new Player();
i.UseEffect(p);
assertEquals(80,p.getHitPoints());
}

/**
this tests how a Beef affects a player
*/
@Test public void test_BeefOnPlayer(){
Beef i= new Beef();
Player p=new Player();
i.UseEffect(p);
assertEquals(40,p.getAttack());
}
/**
this tests how a Beef affects a player
*/
@Test public void test_BeefOnPlayer(){
Beef i= new Beef();
Player p=new Player();
i.UseEffect(p);
assertEquals(40,p.getAttack());
}


}
Loading

0 comments on commit d7d6127

Please sign in to comment.