exercism / vimscript

Exercism exercises in Vim script.
https://exercism.org/tracks/vimscript
MIT License
20 stars 24 forks source link

Add queen-attack exercise #190

Closed BNAndras closed 10 months ago

BNAndras commented 10 months ago

Related to #172

BNAndras commented 10 months ago

I deviated from the auto-generated test suite which only used the Create function for the first few tests and then passed dictionaries representing positions into CanAttack without going through Create. That didn't seem that interesting so I made Create return a dictionary representing a Queen with a stored CanAttack function.

Since the first test requires a dictionary be returned, students should hopefully make the connection to storing functions in it. However, this might require an instructions append outlining that Vim script doesn't really have classes so that's why we're using a dictionary and maybe a link about Vim script dictionaries.