-
-
Save karol-lotkowski/aa982fcec2f04cdec7a2 to your computer and use it in GitHub Desktop.
Implementation of abstract class (RPG context)
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
package com.karollotkowski.game; | |
import java.util.Random; | |
public class WarriorSkills extends CombatSkills { | |
private static final int STRENGTH = 10; | |
private static final int MANA = 0; | |
@Override | |
protected int fight() { | |
return new Random().ints(0, STRENGTH).findFirst().getAsInt(); | |
} | |
@Override | |
protected int spell() { | |
return MANA; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment