Adding tone to player for Cube Inviders

Hi, I'm trying to add a tone for the player every time it moves but I don't know where to put this code line

(tone, piezo, 523, playerTime);

Any help would be appreciated and here is my code so far.

#include "SPI.h"
#include "Cube.h"

Cube cube;

#include "Wire.h"
#include "WiiChuck.h"

WiiChuck wiichuck = WiiChuck();

unsigned int  joystickReadInterval  = 150;
unsigned long lastJoystickUpdate    = 0;
unsigned long lastEnemyMovement     = 0;
unsigned int  enemyMovementInterval = 600;

int playerX = 1;
int playerY = 0;
int playerZ = 1;

int enemyX;
int enemyY;
int enemyZ;

int piezo = A4;
int notes[] = 
{
 261, 293, 329, 349, 392, 440, 493, 523, 587, 659, 698, 783, 880};

int startTime = 10;
int playerTime = 50;
int enemyTime = 80;
int boomTime = 100;
int shootTime = 30;
int finishTime = 100;


byte lastButtonZState = 0;

void setup(void) {

 cube.begin(0, 115200);
 wiichuck.begin();
 wiichuck.update();
 enemyX = random(0, 4);
 enemyZ = random(0, 4);
 enemyY = 3;
 pinMode(A4, OUTPUT);
}

void loop(void) {
 delay(startTime);
 wiichuck.update();
 cube.all(BLACK);
 checkTrigger();
 updatePlayerPosition();
 updateEnemyPosition();
 cube.set(playerX, playerY, playerZ, BLUE);
 cube.set(enemyX, enemyY, enemyZ, GREEN);
}

void updatePlayerPosition()
{
 if((millis() - lastJoystickUpdate) > joystickReadInterval)
 {    
   int joyX;
   int joyY;

   joyX = wiichuck.readJoyX();
   joyY = wiichuck.readJoyY();

   if(joyX > 50)
     playerX++;

   if(joyX < -50)
     playerX--;

   if(joyY > 50)
     playerZ++;

   if(joyY < -50)
     playerZ--;

   if(playerX > 3)
     playerX = 0;

   if(playerX < 0)
     playerX = 3;

   if(playerZ > 3)
     playerZ = 0;

   if(playerZ < 0)
     playerZ = 3;

   lastJoystickUpdate = millis();
 }
}

void updateEnemyPosition()
{
 if((millis() - lastEnemyMovement) > enemyMovementInterval)
 {
   enemyY--;

   if(enemyY < 0)
   {
     enemyX = random(0, 4);
     enemyZ = random(0, 4);
     enemyY = 3;
   }

   lastEnemyMovement = millis();
   tone(piezo, 261, enemyTime);
 }
}

void checkTrigger()
{
 if((wiichuck.buttonZ) && (lastButtonZState == 0))
 {
   shoot();
 }
 if(wiichuck.buttonZ)
 {
   lastButtonZState = 1;
 } 
 else {
   lastButtonZState = 0;
 } 
}

void shoot()
{
 cube.set(playerX, 1, playerZ, YELLOW);
 tone(piezo, 698, shootTime);
 delay(shootTime);
 cube.set(playerX, 2, playerZ, ORANGE);
 tone(piezo, 783, shootTime);
 delay(shootTime);
 cube.set(playerX, 3, playerZ, RED);
 tone(piezo, 880, shootTime);
 delay(shootTime);

 if((enemyX == playerX) && (enemyZ == playerZ))
   enemyY = -1;

 delay(finishTime);

 if((enemyX == playerX) && (enemyZ == playerZ))
 {
   cube.all(YELLOW);
   tone(piezo, 392, boomTime);
   delay(boomTime);
   cube.all(ORANGE);
   tone(piezo, 440, boomTime);
   delay(boomTime);
   cube.all(RED);
   tone(piezo, 493, boomTime);
   delay(boomTime);
   cube.all(BLACK);
 }
}

Please read these two posts:

How to use this forum - please read.
and
Read this before posting a programming question ...
You have posted code without using code tags. The code tags make the code look

like this

when posting source code files. It makes it easier to read, and can be copied with a single mouse click. Also, if you don't do it, some of the character sequences in the code can be misinterpred by the forum code as italics or funny emoticons.
If you have already posted without using code tags, open your message and select "modify" from the pull down menu labelled, "More", at the lower left corner of the message. Highlight your code by selecting it (it turns blue), and then click on the "</>" icon at the upper left hand corner. Click on the "Save" button. Code tags can also be inserted manually in the forum text using the [code] and [/code] metatags.