ML12 - Matlab 12 Queen Function Tian Gu Code: 815 Team...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Matlab 12 Queen Function Tian Gu Code: 815 Team partner: Tielong Su Introduction Last week I finished the rook function, but the bishop part did not work perfectly. I thought I was using the brief way, but the only thing I couldnt figure out were the ranges. This lab was about the queen function. We can say it is just a combination the rook function and the bishop function. Before we solved this, we must make sure the bishop part can work well. So with my partner, I focused on the rest part of the bishop (about the ranges). And finally we got it perfectly and it was very brief. Then we used the queen function in a program to let users play. Queen Function Last time I got this questionable bishop function below, function [chessBoard] = Bishop(c,d); [chessBoard] = ones(8) for x=-2:2 (the part we should fix) chessBoard(c+x,d+x)=0; (we should also these parts because it affect what the range is) end for y=-2:2 (the part we should fix) chessBoard(c-y,d+y)=0; end chessBoard(c,d)=3 end I mentioned I couldnt get the right ranges, here I just put a small range here to make sure it can work. Now we should think about the right ranges which could make it run anytime. We thought about maybe we could do some adjustments to make the function in four quadrants, so this makes ranges much easier to get. Now we should use four for sentences....
View Full Document

Page1 / 6

ML12 - Matlab 12 Queen Function Tian Gu Code: 815 Team...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online