Arcturus-Community/src/main/java/com/eu/habbo/habbohotel/games/wired/WiredGame.java

50 lines
1.2 KiB
Java
Raw Normal View History

2018-07-06 15:30:00 +02:00
package com.eu.habbo.habbohotel.games.wired;
2019-08-04 15:42:18 +02:00
import com.eu.habbo.habbohotel.games.*;
2018-07-06 15:30:00 +02:00
import com.eu.habbo.habbohotel.games.freeze.FreezeGame;
import com.eu.habbo.habbohotel.rooms.Room;
import com.eu.habbo.habbohotel.users.Habbo;
2019-05-26 20:14:53 +02:00
public class WiredGame extends Game {
2019-08-04 15:42:18 +02:00
public GameState state = GameState.RUNNING;
2019-05-26 20:14:53 +02:00
public WiredGame(Room room) {
super(GameTeam.class, GamePlayer.class, room, false);
2018-07-06 15:30:00 +02:00
}
@Override
2019-05-04 22:41:18 +02:00
public void initialise() {
2019-08-04 15:42:18 +02:00
this.state = GameState.RUNNING;
for (GameTeam team : this.teams.values()) {
team.resetScores();
}
2018-07-06 15:30:00 +02:00
}
@Override
2019-05-04 22:41:18 +02:00
public void run() {
2019-08-04 15:42:18 +02:00
this.state = GameState.RUNNING;
2018-07-06 15:30:00 +02:00
}
@Override
2019-05-26 20:14:53 +02:00
public boolean addHabbo(Habbo habbo, GameTeamColors teamColor) {
2019-03-18 02:22:00 +01:00
this.room.giveEffect(habbo, FreezeGame.effectId + teamColor.type, -1);
2018-07-06 15:30:00 +02:00
return super.addHabbo(habbo, teamColor);
}
@Override
2019-05-26 20:14:53 +02:00
public void removeHabbo(Habbo habbo) {
2018-09-12 18:45:00 +02:00
super.removeHabbo(habbo);
2019-03-18 02:22:00 +01:00
this.room.giveEffect(habbo, 0, -1);
2018-07-06 15:30:00 +02:00
}
2019-08-04 15:42:18 +02:00
@Override
public void stop() {
this.state = GameState.RUNNING;
}
@Override
public GameState getState() {
return GameState.RUNNING;
}
2018-07-06 15:30:00 +02:00
}