swap(row1, row2)

Swaps the contents of row1 and row2 in the quadrille.

Example

(click to select rows, press s to swap, or r to randomize)

edit, then run

Syntax

swap(row1, row2)

Parameters

Param Description
row1 Number: Index of the first row to swap
row2 Number: Index of the second row to swap
What this page's examples use
p5.quadrille
drawQuadrille createQuadrille mouseRow randomize isValid swap
p5.js
createCanvas background loadImage key
JavaScript
Array.push

Names the analysis can prove are called, and the line each one is documented on. Local variables and members of an unknown receiver are left out.