Created
February 6, 2015 09:51
-
-
Save arturaz/7d2a891cf55b1b25c423 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def moveAttack[A <: MovableFighter]( | |
| world: World, unit: A, | |
| target: SearchRes[OwnedObj], strict: Boolean=true | |
| )(implicit ev: A#Self =:= A): Result[A] = { | |
| moveAndThen(world, unit, target.path, strict) { case (newWorld, movedUnit) => | |
| movedUnit.attackWS(target.value, newWorld).right.map(_.map { | |
| case (w, u) => (w, u) | |
| }) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment