Skip to content
Snippets Groups Projects
Commit e501daaf authored by phenixceleste's avatar phenixceleste
Browse files

tests completed for all interaction between types

parent 15276be5
No related branches found
No related tags found
1 merge request!5Resolve "Type class"
Pipeline #9670 failed with stage
in 1 minute and 55 seconds
......@@ -4,9 +4,17 @@ import org.scalatest.funsuite.AnyFunSuite
class StackSpec extends AnyFunSuite:
test("Strong type should have increased damage multiplicator") {
assert(Fire.typeEfficiency(Grass) == 2)
assert(Fire.typeEfficiency(Grass).fatcor == 2.0)
}
test("Weak type should have decreased damage multiplicator") {
assert(Fire.computeMultiplier(Water) == 0.5)
assert(Bug.typeEfficiency(Fight).factor == 0.5)
}
test("Common type should have neutral damage multiplicator") {
assert(Electric.typeEfficiency(Poison).factor == 1.0)
}
test("Inefficient type should have null damage multiplicator") {
assert(Normal.typeEfficiency(Ghost).factor == 0.0)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment