-
-
Save exelotl/673d8258e697ddb2cd56af5bab9180bb to your computer and use it in GitHub Desktop.
Pokemon type matchup table example
This file contains 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
type PokeType = enum | |
Fire | |
Water | |
Grass | |
Electric | |
const matchups: array[Fire..Electric, array[Fire..Electric, float]] = [ | |
[0.5, 0.5, 2.0, 1.0], | |
[2.0, 0.5, 0.5, 1.0], | |
[0.5, 2.0, 0.5, 1.0], | |
[1.0, 2.0, 0.5, 0.5], | |
] | |
echo matchups[Fire][Grass] # 2.0, it's super effective! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment