how to combine a GUI timer with battleship game

조회 수: 5 (최근 30일)
elor cohen
elor cohen 2019년 6월 15일
답변: Image Analyst 2019년 6월 17일
hi everyone , so i have a .m file that is a battleship game that works fine , and i need to add to this game a timer.
ive successed to create a timer with gui , but the big problem is that i dont know how to combine them ,
i dont know what should i do maybe add an axes option in the GUI and try to plot the game into it
really need your help thx.
  댓글 수: 5
elor cohen
elor cohen 2019년 6월 15일
I need to appropiate time for each game , like i determine a 2 minute game and a countdown clock is displayed while the game is running
Walter Roberson
Walter Roberson 2019년 6월 15일
https://www.mathworks.com/matlabcentral/fileexchange/12628-stopwatch shows an example of building a clock based upon a timer object. timer objects execute asynchronously, so you can have that running at the same time the GUI is operating.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2019년 6월 17일
FYI, the MATLAB Facebook page has an item on Battleship:

카테고리

Help CenterFile Exchange에서 Number games에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by