public Boolean actie(Tamagotchi tamagotchi, IInstructies actie) { if (this.rules(tamagotchi) == false) { return(false); } else { if (tamagotchi.status.getBezig() != true) { int duur = actie.ExcecuteInstructie(tamagotchi); tamagotchi.status.setBezig(duur); tamagotchi.lastAcces = DateTime.Now; } } if (tamagotchi.status.getOverleden() == true) { return(false); } return(true); }
public void addInstructie(IInstructies actie) { acties.Add(actie); }