开发者

How to Map a Pacman Maze Using 2D Array

开发者 https://www.devze.com 2023-01-31 23:04 出处:网络
I have created a map (experimental) which has a \'#\' value if 开发者_如何学Gothere is a Boundry Wall in the maze. Laying the Map Graphically I use a checking condition that if the value of the 2D arr

I have created a map (experimental) which has a '#' value if 开发者_如何学Gothere is a Boundry Wall in the maze. Laying the Map Graphically I use a checking condition that if the value of the 2D array is a # then put an image in that cell. But the Problem is That How will i know Know where to put the image on the screen (The Pixel Position of the Screen).


Simply multiply the x position by the width of your graphics tile and the y position by its height...?

0

精彩评论

暂无评论...
验证码 换一张
取 消