Skip to content

Content of file C4GSTMoveStrategyFactory.java

package de.fhdw.gaming.ipspiel23.c4.gststrategy;

import de.fhdw.gaming.ipspiel23.c4.moves.factory.IC4MoveFactory;
import de.fhdw.gaming.ipspiel23.c4.strategies.IC4Strategy;
import de.fhdw.gaming.ipspiel23.c4.strategies.IC4StrategyFactory;

/**
 * The StrategyFactory. Is being provided via the module.
 */
public class C4GSTMoveStrategyFactory  implements IC4StrategyFactory {

    @Override
    public IC4Strategy create(IC4MoveFactory moveFactory) {
Parameter 'moveFactory' is not assigned and could be declared final.
A method argument that is never re-assigned within the method can be declared final.
    
        

public void foo1 (String param) {       // do stuff with param never assigning it

}

public void foo2 (final String param) { // better, do stuff with param never assigning it

}

        
    
See PMD documentation.
return new C4GSTMoveStrategy(moveFactory); } }