From: corey kennedy on 16 Apr 2010 19:12 does anyone know how to make a loop where two different ylabels are displayed every other turn? (a turn would be denoted as a click and move of a checker piece.) this is what I have so far and cannot find where the "index exceeds the matrix dimensions." this is for a checkers game project and if you have any information or advice that would be much appreciated. f=[1:2:49]; g=[2:2:50]; movecount=0; while movecount(f)<50&&movecount(g)<50 pos=ginput(1); movecount=movecount+1; if any(movecount==f,f) ylabel('player ones turn') else ylabel('player twos turn') end while ~((pos(1)>=btn_left) & (pos(1)<=btn_right) &... (pos(2)>=btn_bottom) & (pos(2)<=btn_top)) pos = ginput(1); end end
|
Pages: 1 Prev: notch filter problem Next: ofdma subcarrier Carrier to noise ratio |