I was wondering if anybody has the code for a drunken cockroach problem? I wrote it in basic and I am having diffuculty writing in assembly language. Problem: A drunken cockroach is place on a given square in the middle of a tile floor in a rectangualr room of size NxM tiles. The bug wanders (possibly in search of an aspirin) randomly from tile to tile throughour the room. Assuming that it may move from its present tile to any of the eight tiles surrounding it ( unless it is against a wall) with equal probability, how long will it take the cockroach to touch every tile on the floor at least once? Use a two dim count to store the number of times our cockroach has reached each tile on the floor. All the cells of this array are initialized to zero. The position of the bug on the floor may be represented by the coordinates (IBUG, JBUG) and is initialized. The eight possible moves fo the bug are represented by the tiles located at (IBUG+IMOVE(K), JBUG+JOMOVE(K) where 0
Posted on 2000-11-12 21:56:00 by turk2001
Nope. No one has that. It sounds like you've defined your problem, why don't you code it? E
Posted on 2000-11-12 23:53:00 by TTom
LOL 'in search for an aspirin' :D
Posted on 2000-11-13 06:26:00 by Hiroshimator