Factor out generating attacks and defenses.
Compute open attacks depending on the player.
Depends on the player.
The attacked statement.
Cleanup.
Wrong index.