/**
 * Given the width and height of a canvas, calculate the coordinates
 * that divide the canvas into a grid of squares. Return the coordinates
 * as a list of pairs.
 *
 * @param width The width of the canvas.
 * @param height The height of the canvas.
 * @return A list containing pairs representing the coordinates
 * of each square in the grid.
 */
fun calculateCoordinates(width: Int, height: Int): List<Pair<Int, Int>> {

    val coordinates = mutableListOf<Pair<Int, Int>>()

    for (x in 0 until width) {
        for (y in 0 until height) {
            if (x % (width / 3) == 0 && y % (height / 2) == 0) {
                coordinates.add(Pair(x, y))
            } else if (x % (width / 3) == 0) {
                coordinates.add(Pair(x, y))
            } else if (y % (height / 2) == 0) {
                coordinates.add(Pair(x, y))
            }
        }
    }

    return coordinates
}
/**
 * Given the width and height of a canvas, calculate the coordinates
 * that divide the canvas into a grid of squares. Return the coordinates
 * as a list of pairs.
 *
 * @param width The width of the canvas.
 * @param height The height of the canvas.
 * @return A list containing pairs representing the coordinates
 * of each square in the grid.
 */
fun calculateCoordinates(width: Int, height: Int): List<Pair<Int, Int>> {
/**
 * Given the width and height of a canvas, calculate the coordinates
 * that divide the canvas into a grid of squares. Return the coordinates
 * as a list of pairs.
 *
 * @param width The width of the canvas.
 * @param height The height of the canvas.
 * @return A list containing pairs representing the coordinates
 * of each square in the grid.
 */
fun calculateCoordinates(width: Int, height: Int): List<Pair<Int, Int>> {

    val coordinates = mutableListOf<Pair<Int, Int>>()

    for (x in 0 until width) {
        for (y in 0 until height) {
            if (x % (width / 3) == 0 && y % (height / 2) == 0) {
                coordinates.add(Pair(x, y))
            } else if (x % (width / 3) == 0) {
                coordinates.add(Pair(x, y))
            } else if (y % (height / 2) == 0) {
                coordinates.add(Pair(x, y))
            }
        }
    }

    return coordinates
}