Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

Commit

Permalink
Start alleen een nieuw spel als de speler in het hoofdmenu zit
Browse files Browse the repository at this point in the history
Closes #5
  • Loading branch information
mbernson committed Apr 18, 2014
1 parent 65f09d7 commit a8e578a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/ipsen1/quarto/task/StartNieuwSpel.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

import ipsen1.quarto.QuartoApplication;
import ipsen1.quarto.form.BordForm;
import ipsen1.quarto.form.Hoofdmenu;

public class StartNieuwSpel extends Task {
private boolean isInHoofdmenu() {
return QuartoApplication.currentApplication().currentForm() instanceof Hoofdmenu;
}

@Override
public boolean validate() {
return true;
return isInHoofdmenu();
}

@Override
Expand Down

0 comments on commit a8e578a

Please sign in to comment.