Im writing the code of battleship game between two humans in

I\'m writing the code of battleship game between two humans in Matlab. I want to create a 10x10 board. How do I create and display a board for this game in Matlab using GUI?

Solution

Matlab provides an inbuilt function called checkboard which will create graphical checkboard according to the arguments passed.

If the function is called without any arguments, by default it will create 8 x 8 chess board. To create 10 x 10 chessboard, use the function of format chessboard(n,p,q) where p and q refers number of rows and columns in the chessboard respectively. n represents the number of pixels inside each square.

I\'m writing the code of battleship game between two humans in Matlab. I want to create a 10x10 board. How do I create and display a board for this game in Matl

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site