Created
September 15, 2015 22:09
-
-
Save Tefferson/f3d80b9bb64d3a045389 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Elfo { | |
private String nome; | |
private int flechas; | |
private int experiencia; | |
public Elfo(String n, int flech) { | |
nome = n; | |
flechas = flech; | |
experiencia = 0; | |
} | |
public void atirarFlecha() { | |
flechas--; | |
experiencia++; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Elfo { | |
private String nome; | |
private int flechas; | |
private int experiencia; | |
public Elfo(String n, int flech) { | |
nome = n; | |
flechas = flech == 0 ? 42 : flech; | |
experiencia = 0; | |
} | |
public void atirarFlecha() { | |
flechas--; | |
experiencia++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment