I am currently creating a Chess game, and I'm setting up an array for each chess piece which contains their legal move set. For example, a bishop can only move diagonally so the move set would need to be the following to move in a left upwards diagonal.
[[-1, -1], [-2, -2] ...repeated... [-7, -7], [-8, -8]]
Rather than having long lines of code for each direction, is there a way I can created a nested array with two range?
Eg:
([-1, -1])..([-8, -8])