-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created the GameEndService, added it to the Service Locator and initi…
…alised it in the Main game
- Loading branch information
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
source/core/src/main/com/csse3200/game/services/GameEndService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.csse3200.game.services; | ||
|
||
public class GameEndService { | ||
|
||
private int engineerCount; | ||
|
||
public GameEndService() { | ||
this.engineerCount = 5; | ||
} | ||
|
||
public int getEngineerCount() { | ||
return engineerCount; | ||
} | ||
|
||
public void updateEngineerCount() { | ||
engineerCount -= 1; | ||
if (engineerCount == 0) { | ||
// loss screen | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters