Alloy Community

User login

Model of pacaman for any n*m board (This one is 5*5)

Date: 
Oct 19 2008
author: 
Colm Bhandal & David Faitelson

//Based on David Faitelson's original model for a 3*3 pacman board. I wanted to implement the model for any n*m board
//Note that the positions of walls and food are not very imaginatively chosen, and may be changed as long they don't
//share a position. Also note that you need to make sure that the BitWidth is set such that 2^(BitWidth-1) is > n*m, i.e. that the area of the
//board is within the range of the positive integers. Otherwise the position ordering gets messed up. A final note: My
//positions are column (x) by row(y), just like the standard Cartesian plane so the wall and food setup would look
//like this (capital fs are just there to make the columns align):

//x x x x x
//x x x x x
//f F f w x
//f F f w x
//f F f w x



Attachment


Size
Pacman.txt3 KB

Syndicate content  

The development of this site is supported by the National Science Foundation under Computing Research Infrastructure Grant No. 0707612.

Theme originally designed by Chris Herberte