Problem 1231. PACMAT Easy
Solution Stats
Problem Comments
-
4 Comments
very cool, love the problem!
Agreed, although (unlike you) I'm not clever enough to solve it without a joystick...
FOR THOSE WHO WANNA MAP IT AS YOU GO, for shigs
I already made the map for ya (DL the png, the fig takes more mem. to load in)
https://drive.matlab.com/sharing/967b8ae8-4cc3-4979-bc17-558709c8a09c
Easy as ...
map1 = imread('Map1.png');
map1 = imresize(map1, [M*18, N*18]);
imshow(map1);
Then when you're plotting your points, multiply the coordinate by 18 and shift x by -8 and y by +9
i.e.
xShift = -8; yShift = 9;
x = j*18 + xShift; y = (M-i+1)*-18 + M*18 + yShift;
Fun stuff. Haven't solved the problem yet but I'm loving it (spending too much time on the graphics probably :D )
OH and the RGB for the ghosts is...
gh1 = [1 0 0]; % BLINKY (red)
gh2 = [20 299 228]/255; % INKY (blue)
gh3 = [226 147 228]/255; % PINKY (pink)
gh4 = [228 153 59]/255; % CLYDE (orange)
Solution Comments
Show commentsProblem Recent Solvers13
Suggested Problems
-
Determine Whether an array is empty
746 Solvers
-
Return a list sorted by number of consecutive occurrences
342 Solvers
-
Connect Four: find winning move
24 Solvers
-
Fix the last element of a cell array
1038 Solvers
-
500 Solvers
More from this Author293
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!