-
assigning one javaScript array to another
In pacMan I have an array called dotMap which holds all the coordinates of the pac-dots that pacMan eats. I also have a copy of this array called currentDotMap which is used during the game. Each element contains a 0 or 1 to show the presence of a dot or not. As pacMan moves I…
-
backgroundWorker in VB
A student of mine was writing a program in visualBasic which had a subroutine that under certain circumstances could take a very long time to execute. This would cause the user interface to ‘hang’ as it was not being updated. In order to deal with this we added a Background Worker from the toolbox onto…
-
javaScript switch statement
In pacMan each type of ghost has a different target cell. I assumed that the javaScript switch statement would behave the same as in other languages I have used. How wrong I was! It was so puzzling that every ghost, despite its type, behaved exactly the same as Clyde. After a lot of head scratching…
-
pacMan
I wanted a little project to help me learn some javaScript to draw on an html canvas. I decided to have a go at creating a pacMan game. This is the result …