Skip to content

ingconti/ApplyingLambdas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ApplyingLambdas

2020 ingsw basic sample

PLEASE fix POM to use Lambdas:

      <artifactId>maven-compiler-plugin</artifactId>
    
      <version>3.8.0</version>
      <configuration>
      <source>1.8</source>
        <target>1.8</target>
        </configuration>

CODE: see in particular:

Effect eff1 = (p) -> {
    p.moveRight();
};

Effect eff2 = (p) -> {
    p.moveRight();
    p.moveUp();
    p.moveRight();

};

...

    p1.applyToMe(eff1);
    p1.showStatus();

    Player p2 = new Player();
    p2.applyToMe(eff2);
    p2.showStatus();

...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages