Worked on / edited the code (this is what I came up with so far, don't know how to put it into code though):
N = 3
K = 4
boardInit = initializeBoard(N, K);
function [M, turn] = initializeBoard(N, K)
M = zeros(N+2,N+3)
turn = randi(2,1,1)
How would I go about adding random yellow or red pieces (ones and twos) to the board. They have to start at the bottom (to simulate gravity, irl they would fall down too) and have to be randomly distributed.
I don't need a whole piece of code, just an idea of what I could use. All help is greatly appreciated!