public void mouseReleased(MouseEvent e) {
			if (!playerTurn)
				return;
			int x = e.getX();
			int y = e.getY();
			if (x < NimGamePanel.this.getWidth() && x >= 0 && 
					y < NimGamePanel.this.getHeight() && y >= 0) {
				y = NimGamePanel.this.getHeight() - y;
				// calculates the i in the array
				int i = x / 50 + (y / 50 * 10);
				if (i < isTaken.length && !isTaken[i] && numTakenThisTurn < maxNumTakable) {
					// takes the item
					isTaken[i] = true;
					numTakenThisTurn++;
					numLeft--;
					repaint();

					// animation
					int animX = (50 - image.getWidth())/2 + i%10*50 - 7;
					int animY = (50 - image.getHeight())/2 + getHeight() - i/10*50-50 - 5;
					AnimationRunner.RUNNER.addAnimatable(new Explosion(animX,animY,2,playerDone));

					// if the player took the maximum number of things, then their turn is over
					if (numTakenThisTurn == maxNumTakable) {
						playerTurn = false;
					}
				}
			}
		}