Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void execute(Game game, String string) {
- Item item = game.getCurrentRoom().getItem(string);
- if(item != null){
- if(item instanceof Openable) {
- Openable itm = (Openable) item;
- itm.open();
- } else { game.getUI().println("Tento predmet sa neda otvorit");}
- } else {
- game.getUI().println("Taky predmet tu nikde nevidim");
- }
- }
- chybu vyhadzuje itm.open();
- method open in interface items.Openable cannot be applied to given types
- required: textgame.UserInterface
- found: no arguments
Add Comment
Please, Sign In to add comment