Tudo Feito

This commit is contained in:
250408
2026-06-23 11:14:16 +01:00
parent 1872b8881f
commit 85d563700e

View File

@@ -6,7 +6,6 @@ import java.io.*;
public class TIC_Projeto_Final { public class TIC_Projeto_Final {
// Jogador
static String nome; static String nome;
static int vida = 100; static int vida = 100;
static int fome = 100; static int fome = 100;
@@ -16,19 +15,16 @@ public class TIC_Projeto_Final {
static int nivel = 1; static int nivel = 1;
static int dias = 1; static int dias = 1;
// Inventário
static int comida = 2; static int comida = 2;
static int garrafas = 2; static int garrafas = 2;
static int kits = 1; static int kits = 1;
// Armas
static String arma = "Paus"; static String arma = "Paus";
static int danoArma = 10; static int danoArma = 10;
static Scanner ler = new Scanner(System.in); static Scanner ler = new Scanner(System.in);
static Random random = new Random(); static Random random = new Random();
// ===================== ESTADO =====================
public static void estado() { public static void estado() {
System.out.println("\n===== ESTADO ====="); System.out.println("\n===== ESTADO =====");
System.out.println("Jogador: " + nome); System.out.println("Jogador: " + nome);
@@ -47,7 +43,6 @@ public class TIC_Projeto_Final {
System.out.println("Arma: " + arma); System.out.println("Arma: " + arma);
} }
// ===================== XP =====================
public static void ganharXP(int valor) { public static void ganharXP(int valor) {
xp += valor; xp += valor;
@@ -58,7 +53,6 @@ public class TIC_Projeto_Final {
} }
} }
// ===================== TEMPO =====================
public static void passarTempo() { public static void passarTempo() {
dias++; dias++;
fome -= 5; fome -= 5;
@@ -77,7 +71,6 @@ public class TIC_Projeto_Final {
} }
} }
// ===================== EVENTOS =====================
public static void eventoAleatorio() { public static void eventoAleatorio() {
int evento = random.nextInt(10); int evento = random.nextInt(10);
@@ -105,7 +98,6 @@ public class TIC_Projeto_Final {
} }
} }
// ===================== PROCURAR =====================
public static void procurar() { public static void procurar() {
int sorte = random.nextInt(4); int sorte = random.nextInt(4);
@@ -132,7 +124,6 @@ public class TIC_Projeto_Final {
passarTempo(); passarTempo();
} }
// ===================== LUTA =====================
public static void lutar() { public static void lutar() {
String[] inimigos = {"Lobo", "Urso", "Javali"}; String[] inimigos = {"Lobo", "Urso", "Javali"};
@@ -164,7 +155,6 @@ public class TIC_Projeto_Final {
passarTempo(); passarTempo();
} }
// ===================== CONSUMO =====================
public static void comer() { public static void comer() {
if (comida > 0) { if (comida > 0) {
comida--; comida--;
@@ -195,7 +185,6 @@ public class TIC_Projeto_Final {
} }
} }
// ===================== LOJA =====================
public static void loja() { public static void loja() {
System.out.println("\n===== LOJA ====="); System.out.println("\n===== LOJA =====");
@@ -241,7 +230,6 @@ public class TIC_Projeto_Final {
} }
} }
// ===================== SAVE =====================
public static void guardar() { public static void guardar() {
try { try {
PrintWriter p = new PrintWriter(new FileWriter("save.txt")); PrintWriter p = new PrintWriter(new FileWriter("save.txt"));
@@ -267,7 +255,6 @@ public class TIC_Projeto_Final {
} }
} }
// ===================== LOAD =====================
public static void carregar() { public static void carregar() {
try { try {
File f = new File("save.txt"); File f = new File("save.txt");
@@ -296,7 +283,6 @@ public class TIC_Projeto_Final {
} }
} }
// ===================== MENU =====================
public static void menu() { public static void menu() {
System.out.println("\n===== MENU ====="); System.out.println("\n===== MENU =====");
System.out.println("1 Procurar"); System.out.println("1 Procurar");
@@ -310,7 +296,6 @@ public class TIC_Projeto_Final {
System.out.println("9 Sair"); System.out.println("9 Sair");
} }
// ===================== MAIN =====================
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("🏕️ JOGO DE SOBREVIVÊNCIA"); System.out.println("🏕️ JOGO DE SOBREVIVÊNCIA");