# Whack-a-mole Game in AS3

**URL:** https://forum.kirupa.com/t/whack-a-mole-game-in-as3/299484
**Category:** flash
**Created:** [November 5, 2009, 4:49pm UTC](https://forum.kirupa.com/t/whack-a-mole-game-in-as3/299484 "2009-11-05T16:49:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![trowley](https://avatars.discourse-cdn.com/v4/letter/t/8edcca/32.png) [@trowley](https://forum.kirupa.com/u/trowley)
#### Post date: [November 5, 2009, 4:49pm UTC](https://forum.kirupa.com/t/whack-a-mole-game-in-as3/299484/1 "2009-11-05T16:49:48Z")

</div>

Hey:

I am building a whack-a-mole game in AS3. I have the basic structure down but am trying to figure out how to have one instance of a random ‘enemy’ appear in one slot at a time. So there would not be a duplicate ‘enemy’ anywhere else simultaneously as well as only one instance can occupy a slot at a given time.

Anyone have any suggestion on what direction? Array? for loop? if? tutorial?

Thanks
