Skip to content

Commit

Permalink
fixed errors with timer and messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenttrinh3336 committed Apr 15, 2024
1 parent f0de264 commit 1e267a3
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package uta.cse3310;
import java.util.Timer;
import java.util.TimerTask;

public class Timer {
public class Game_Timer {
private Timer timer;
private int secondsRemaining;
private boolean isGameEnded;
private int playerScore;

public Timer(int seconds, int playerScore) {
public Game_Timer(int seconds, int playerScore) {
this.secondsRemaining = seconds;
this.timer = new Timer();
this.isGameEnded = false;
Expand Down Expand Up @@ -51,9 +52,4 @@ private void declareWinner() {
// Add code here to declare the winner with the highest score
System.out.println("The winner is the player with the highest score: " + playerScore);
}

public static void main(String[] args) {
Timer timer = new Timer(60, 10); // 60 seconds, player score: 10
timer.start();
}
}

0 comments on commit 1e267a3

Please sign in to comment.