matlab connect 4 game

I am making a connect 4 game using matlab and have gotten stuck. This is what i have so far. Any help would be appreciated.
figure('Units','normalized','Position',[.2 .2 .6 .6], ...
'Name','Connect Four','Color','w');
axes('Units','normalized','Position',[.1 0 .8 .8], ...
'Color','y','LineWidth',1,'Box','on');
set(gca, 'XTick',[],'YTick',[],'XLim',[0,160],'YLim',[0,160]);
hold on;
for row = 1:7
for col = 1:7
board(row,col) = plot( col*20,row*20, 'wo','MarkerSize',30,...
'LineWidth',.5,'MarkerFaceColor',[1 1 1]', ...
'MarkerEdgeColor', [0 0 0]);
end
end

1 comentario

Philip Caplan
Philip Caplan el 29 de Abr. de 2015
Where exactly are you getting stuck? Are you looking to implement callbacks to provide user interaction with your game? If so, please see

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Board games en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 28 de Abr. de 2015

Editada:

el 29 de Abr. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by