mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-23 03:45:13 +00:00
Update instructions/scala2.instructions.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -261,7 +261,7 @@ targets.foreach {
|
|||||||
// Good - match on type
|
// Good - match on type
|
||||||
targets.foreach {
|
targets.foreach {
|
||||||
case p: Pokemon =>
|
case p: Pokemon =>
|
||||||
val loss = sys.min(0, myAttack - p.defense)
|
val loss = math.min(0, myAttack - p.defense)
|
||||||
p.copy(hp = p.hp - loss)
|
p.copy(hp = p.hp - loss)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user