Skip to content

Commit

Permalink
eepy
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsundoiii committed Sep 19, 2024
1 parent 47f44d1 commit e8391db
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Character.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
public class Character {
private String name;
private int health;
private static final int MAX_HEALTH = 100;

public Character(String name) {
this.name = name;
health = 0;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

/* Add a getter for health here. */

/*
* Add a setter for health here. The max health is MAX_HEALTH, so don't set
* health above that.
*/
}
47 changes: 47 additions & 0 deletions Main.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
// Scanner scanner = new Scanner(System.in);

// String hello = "Hello World";
// int a = 3;
// boolean b = true;
/* Make a double variable named 'd' with the value 6.28 */

System.out.println("Hello World!");

// if (a == 3) {
// System.out.println("a is 3! :D");
// } else if (a == 4) {
// System.out.println("a is 4! :>");
// } else {
// System.out.println("a is not 3 or 4! >:c");
// }

/* Counts up from 0 to 5 */
// int i = 0;
// while (i < 5) {
// System.out.println(i);
// i++;
// }

/* Same thing as the while loop above, expressed as a for loop */
// for (int j = 0; j < 5; j++) {
// System.out.println(j);
// }

/* Write while and for loops to count down from 5 to 0 here */
}

// This is a void method because it doesn't return anything
// static void sayHi() {
// System.out.println("Hi! :3");
// }

// This method returns a value, it has a return type instead of 'void'
// static double add(double x, double y) {
// return x + y;
// }

/*
* Write a method that takes in two ints and prints out
* "Subtracting <second int> from <first int>", then returns the result of the
* subtraction
*/
}

0 comments on commit e8391db

Please sign in to comment.