Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Java by Leaghte ( 15 years ago )
@Override
    public GameState execute(Game game) {

        GameImpl hra = (GameImpl) game;

        if (!wasUsed) {
            if (this.getParams().equals("BALKON")
                    || this.getParams().equals("IZBA")
                    || this.getParams().equals("PLAZ")
                    || this.getParams().equals("MORE")) {
                if (game.getBackpack().size() == 10) {
                    wasUsed = true;
                    hra.setCCurrentRoom(this.getParams());
                    return GameState.PLAYING;
                } else {
                    System.out.println("Nemaš zozbierane všetky itemy!");
                    return GameState.PLAYING;
                }
            } else {

                wasUsed = true;
                hra.setCCurrentRoom(this.getParams());
            }
            return GameState.PLAYING;
        }
        System.out.println("Teleport uz bol raz pouzity");
        return GameState.PLAYING;
    }

 

Revise this Paste

Parent: 27022
Your Name: Code Language: