HT5787 can you help me with change the security question
can you help me with change the security question
If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then the steps half-way down this page give you a reset link on your account : http://support.apple.com/kb/HT5312
If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset.
Contacting Apple about account security : http://support.apple.com/kb/HT5699
When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use
Similar Messages
-
HT5312 Can you assist me with my forgotten security questions answers ?
Can you help me retrieve my security questions ?
Alternatives for Help Resetting Security Questions and/or Rescue Mail
1. If you have a valid rescue email address, then use this procedure:
Rescue email address and how to reset Apple ID security questions.
2. Fill out and submit this form. Select the topic, Account Security. You must
have a Rescue Email to use this option.
3. This is the only option if you do not already have a valid Rescue Email.
These are telephone numbers for contacting Apple Support in your country.
Apple ID- Contacting Apple for help with Apple ID account security. Select
the appropriate country and call. Ask to speak to the Account Security Team.
Note: If you have already forgotten your security questions, then you cannot
set up a rescue email address in order to reset them. You must set up
the rescue email address beforehand.
Your Apple ID: Manage My Apple ID.
Apple ID- All about Apple ID security questions. -
I see there is no way to change the security questions i set up when I first purchased my ipod touch. All the answers I get do not work. Can't by another device until I get around this issue.
Reset Security Questions
Frequently asked questions about Apple ID
Manage My Apple ID
Or you can email iTunes Support at iTunes Store Support.
If all else fails:
1. Go to: Apple Express Lane;
2. Under Product Categories choose iTunes;
3. Then choose iTunes Store;
4. Then choose Account Management;
5. Now choose iTunes Store Security and answer the bullet questions, then click
Continue;
6. Sign in with your Apple ID and press Continue;
7. Under Contact Options fill out the information and advise iTunes that you would
like your security/challenge questions reset;
8. Click Send/Continue.
You should get a response within 24 hours by email.
In the event you are unsuccessful then contact AppleCare - Contacting Apple for support and service.
Another user had success doing the following:
I got some help from an apple assistant on the phone. It is kind of round about way to get in.
Here is what he said to do and it is working for me...
a. on the device that is asking you for the security questions go to "settings", > "store" >
tap the Apple ID and choose view"Apple ID" and sign in.
b. Tap on payment information and add a credit/debit card of your preference then select
"done", in the upper right corner
c. sign out and back into iTunes on the device by going to "settings"> "store" > tap the
Apple ID and choose "sign-out" > Tap "sign -in" > "use existing Apple ID" and you
should be asked to verify your security code for the credit /debit card and NOT the
security questions.
d. At this time you can remove the card by going back in to edit the payment info and
selecting "none" as the card type then saving the changes by selecting "done". You
should now be able to use your iTunes store credit without answering the security
questions.
It's working for me ...I just have to put in my 3 digit security pin from the credit card I am using.
Good Luck friends! -
Hello, we have both Creative Cloud membership and Creative Cloud for team. Can you help me with the difference and if i need to have both? We have 9 employees that are using it. Just not sure if i'm paying for something i don't need.
Thank youPlease refer to Creative Cloud Help | Creative Cloud / Common Questions
CC is for retail use with 20 GB of storage space, CCT is where number of seats are purchased & assigned by one program admin where each seat gets 100GB of storage space.
You can not have both the CC & team in one account as it will only provide you added storage space of 120 GB but you can activate the CC any of them or either of them twice as CC is based on Adobe ID.
Regards
Rajshree -
i recently updated to ios 6.1.1 and since then, the photos i am uploading via ios does not show on my timeline or on the newsfeed, but the pictures show in the album. can you help me with it? thanks.
fingers crossed, it appears they are working the bugs out of this update....i was able to post a pic to my newsfeeds/time line this morning....first the picture went into the ios album but within a minute, it appeared on my timeline! im glad ...
-
Dear all
How to Setup Forward Error Handling in PI Scenarios. Can you help me with the same with screen shots if possible?
Thanks
Regards
karanHello
These are the following errors
1. Trace level="1" type="T">no interface action for sender or receiver found</Trace>
2. <Trace level="1" type="System_Error">Application-Error exception return from pipeline processing!
3.
<Trace level="1" type="T">Application Error at Receiver... => ROLLBACK WORK</Trace>
<Trace level="1" type="T">System Error at Receiver... => ROLLBACK WORK</Trace>
<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
<Trace level="1" type="System_Error">Application-Error exception return from pipeline processing!</
Trace level="3" type="T">No persisting of message after plsrv call, because of config</Trace>Trace level="3" type="T">Error of the prevous version:</TraceTrace level="3" type="T">Error ID APPLICATION_ERROR</Trace>
tThere are repeating errors also.
TThanks
Regards
kkaran -
Question
I play Zuma Blitz on FB; Ever since I upgraded to Firefox 4 I can't play the game the darn frog pauses before shooting and it's a mess; you know it's what I enjoy doing and it needs to be fixed can you help me with this??? I am super frustrated ith the situationThanksUpgrading to firefox 5 and updating my plug-ins helped a bit. Frog is less 'sticky' now, but it's not solved the problem. Java needs to be up to speed or the frog goes into stasis....
-
We live in motel but my iMac is not connecting with the internet but my cousin has hp laptop that works perfectly fine in my room. So can you help me with this situation?
Joining an encrypted WEP or WPA Wi-Fi network
-
I have a Maxtor 3200 which has stopped communicating with my iMac for no reason can you help i'am running the latest system
I have never seen this before. Try using these installers
Flash Player for ActiveX (Internet Explorer)
Flash Player Plug-in (All other browsers) -
hi i need help with my ipod nano i want to transfer my music from the ipod to the itunes so that i can be able to transfer the music to my ipad can you help me with that ?
You cannot use iTunes to transfer song files from iPod to computer, except for songs purchased from the iTunes Store. However, there are third-party methods and utilities that can transfer from iPod to computer. If you do an Internet search on something like"iPod transfer," you should get some links. (The CNET article seems to be popular.)
Once the song files are on your computer's drive, you can add them to your iTunes library, and then sync your iPad. -
Can anyone help me with changing email address for resetting password notification
Can anyone help me with changing email address for resetting password notification?
If you know the answers to your security questions, you can change your rescue email address as shown in step 6 in this article: http://support.apple.com/kb/HT5312.
If you don't kow the answers to your security questions or need other assistance doing this, either contact Apple for assistance by going to https://expresslane.apple.com, then click More Products and Services>Apple ID>Other Apple ID Topics>Lost or forgotten Apple ID password, or contact the Apple account security team: http://support.apple.com/kb/HT5699. -
Can you help me with mouse pressed method please?
hi
can you help me with my problem please, player label doesn't show up in the applet and the draw string method it doesn't draw any strings like X or O for the game I don't know what is the problem maybe it is with MousePressed method which is in Board class. I tried to write the code of the location many times I'm not sure if the problem comes from there.
there is no error in my code, but it doesn't work.
this is class Board which has the mouseListener
class Board extends JPanel implements MouseListener, MouseMotionListener
private JLabel playerlabel;
private boolean play;
private boolean start;
private int turn;
private Square squares[][];
private Player myplayer[][];
public Board()
setBackground( Color.WHITE );
playerlabel = new JLabel( "X player first" );
//playerlabel.setLayout(null);
// playerlabel.setLocation(500,500);
add( playerlabel );
play = true;
turn = 1;
squares = new Square[3][3];
myplayer = new Player[3][3];
int x = 40;
int y = 40;
for (int i=0; i<3; i++){
x = 40;
for (int j=0; j<3; j++){
Square s = new Square( x,y );
squares[i][j] = s;
x +=50;
y +=50;
this.addMouseListener(this);
this.addMouseMotionListener(this);
public void mouseClicked( MouseEvent event ){}
public void mouseMoved( MouseEvent event ){}
public void mouseEntered( MouseEvent event ){}
public void mouseExited( MouseEvent event ){}
public void mousePressed( MouseEvent event )
{int xPos = event.getX();
int yPos = event.getY();
if(play && turn ==1){
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
int x = squares[i][j].getX();
int y = squares[i][j].getY();
if(xPos> x && xPos<x+40&& yPos> y && yPos<y+40){
if( squares[i][j].getOccupied() ==0 ){
String ptext;
ptext = "X";
Player p = new Player(x, y,ptext);
myplayer[i][j] = p;
squares[i][j].setOccupied(1);
playerlabel.setText( "O Player Turn" );
turn = 2;
repaint();
Win();
else{
turn = 2;
playerlabel.setText( "O Player Turn" );
repaint();
if ( play && turn ==2 )
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
int x = squares[i][j].getX();
int y = squares[i][j].getY();
if(xPos> x && xPos<x+40&& yPos> y && yPos<y+40){
if( squares[i][j].getOccupied() ==0 ){
String ptext;
ptext = "O";
Player p = new Player(x, y,ptext);
myplayer[i][j] = p;
squares[i][j].setOccupied(2);
playerlabel.setText( "X Player Turn" );
turn = 1;
repaint();
Win();
else{
turn = 1;
playerlabel.setText( "X Player Turn" );
repaint();
public void mouseReleased( MouseEvent event )
public void mouseDragged( MouseEvent event )
public void Win(){
if(squares[0][0].getOccupied() == squares[0][1].getOccupied() &&squares[0][1].getOccupied()==squares[0][2].getOccupied() &&squares[0][2].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
else if (squares[1][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[1][2].getOccupied() &&squares[1][2].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
else if(squares[2][0].getOccupied() == squares[2][1].getOccupied() &&squares[2][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
if(squares[0][0].getOccupied() == squares[0][1].getOccupied() &&squares[0][1].getOccupied()==squares[0][2].getOccupied() &&squares[0][2].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
else if (squares[1][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[1][2].getOccupied() &&squares[1][2].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
else if(squares[2][0].getOccupied() == squares[2][1].getOccupied() &&squares[2][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
//Vertically win
if (squares[0][0].getOccupied() == squares[1][0].getOccupied() &&squares[1][0].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
else if (squares[0][1].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][1].getOccupied() &&squares[2][1].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
else if(squares[0][2].getOccupied() == squares[1][2].getOccupied() &&squares[1][2].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
if (squares[0][0].getOccupied() == squares[1][0].getOccupied() &&squares[1][0].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
else if (squares[0][1].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][1].getOccupied() &&squares[2][1].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
else if(squares[0][2].getOccupied() == squares[1][2].getOccupied() &&squares[1][2].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
//Diagonal win
if (squares[0][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
else if (squares[0][2].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
if (squares[0][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
else if (squares[0][2].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
}//end win
public void setTurn(int t)
turn = t;
playerlabel.setText( "X Player Plays First" );
public void paintComponent( Graphics g )
super.paintComponent( g );
this.setBackground( Color.WHITE );
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
g.setColor( Color.BLACK );
g.drawRect( squares[i][j].getX(), squares[i][j].getY(), 50, 50 );
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
myplayer[i][j].draw(g);
//End of paintComponent
}and this is the whole code of my program.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
class Player{
private int xCoordinate;
private int yCoordinate;
private String playerText;
public Player(int x, int y, String t)
playerText = t;
xCoordinate = x;
yCoordinate = y;
public void draw(Graphics g)
g.drawString(playerText, xCoordinate, yCoordinate);
public void SetText(String t)
{ playerText = t;
}//end player
class Square
private int x;
private int y;
private int occupied;
public Square(int x1, int y1)
x = x1;
y= y1;
occupied = 0;
public void setX(int x1)
x = x1;
public int getX()
return x;
public void setY(int y1)
y = y1;
public int getY()
return y;
public void setOccupied(int o)
occupied = o;
public int getOccupied()
return occupied;
public class TicTac extends JApplet implements ActionListener
{ private JPanel panel;
private JButton newgame;
private Board B;
public void init()
B = new Board();
add( B, BorderLayout.CENTER );
panel = new JPanel();
newgame = new JButton( "New Game" );
panel.add( newgame);
add( panel, BorderLayout.SOUTH );
newgame.addActionListener(this);
public void actionPerformed( ActionEvent ev)
{ Object source = ev.getSource();
if (source == newgame)
{remove(B);
repaint();
B = new Board();
add( B, BorderLayout.CENTER );
B.setTurn(1);
repaint();
validate();
}//end class TicTac
class Board extends JPanel implements MouseListener, MouseMotionListener
private JLabel playerlabel;
private boolean play;
private boolean start;
private int turn;
private Square squares[][];
private Player myplayer[][];
public Board()
setBackground( Color.WHITE );
playerlabel = new JLabel( "X player first" );
//playerlabel.setLayout(null);
// playerlabel.setLocation(500,500);
add( playerlabel );
play = true;
turn = 1;
squares = new Square[3][3];
myplayer = new Player[3][3];
int x = 40;
int y = 40;
for (int i=0; i<3; i++){
x = 40;
for (int j=0; j<3; j++){
Square s = new Square( x,y );
squares[i][j] = s;
x +=50;
y +=50;
this.addMouseListener(this);
this.addMouseMotionListener(this);
public void mouseClicked( MouseEvent event ){}
public void mouseMoved( MouseEvent event ){}
public void mouseEntered( MouseEvent event ){}
public void mouseExited( MouseEvent event ){}
public void mousePressed( MouseEvent event )
{int xPos = event.getX();
int yPos = event.getY();
if(play && turn ==1){
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
int x = squares[i][j].getX();
int y = squares[i][j].getY();
if(xPos> x && xPos<x+40&& yPos> y && yPos<y+40){
if( squares[i][j].getOccupied() ==0 ){
String ptext;
ptext = "X";
Player p = new Player(x, y,ptext);
myplayer[i][j] = p;
squares[i][j].setOccupied(1);
playerlabel.setText( "O Player Turn" );
turn = 2;
repaint();
Win();
else{
turn = 2;
playerlabel.setText( "O Player Turn" );
repaint();
if ( play && turn ==2 )
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
int x = squares[i][j].getX();
int y = squares[i][j].getY();
if(xPos> x && xPos<x+40&& yPos> y && yPos<y+40){
if( squares[i][j].getOccupied() ==0 ){
String ptext;
ptext = "O";
Player p = new Player(x, y,ptext);
myplayer[i][j] = p;
squares[i][j].setOccupied(2);
playerlabel.setText( "X Player Turn" );
turn = 1;
repaint();
Win();
else{
turn = 1;
playerlabel.setText( "X Player Turn" );
repaint();
public void mouseReleased( MouseEvent event )
public void mouseDragged( MouseEvent event )
public void Win(){
if(squares[0][0].getOccupied() == squares[0][1].getOccupied() &&squares[0][1].getOccupied()==squares[0][2].getOccupied() &&squares[0][2].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
else if (squares[1][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[1][2].getOccupied() &&squares[1][2].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
else if(squares[2][0].getOccupied() == squares[2][1].getOccupied() &&squares[2][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
if(squares[0][0].getOccupied() == squares[0][1].getOccupied() &&squares[0][1].getOccupied()==squares[0][2].getOccupied() &&squares[0][2].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
else if (squares[1][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[1][2].getOccupied() &&squares[1][2].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
else if(squares[2][0].getOccupied() == squares[2][1].getOccupied() &&squares[2][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
//Vertically win
if (squares[0][0].getOccupied() == squares[1][0].getOccupied() &&squares[1][0].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
else if (squares[0][1].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][1].getOccupied() &&squares[2][1].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
else if(squares[0][2].getOccupied() == squares[1][2].getOccupied() &&squares[1][2].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
if (squares[0][0].getOccupied() == squares[1][0].getOccupied() &&squares[1][0].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
else if (squares[0][1].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][1].getOccupied() &&squares[2][1].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
else if(squares[0][2].getOccupied() == squares[1][2].getOccupied() &&squares[1][2].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
//Diagonal win
if (squares[0][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
else if (squares[0][2].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 1)
{playerlabel.setText("Player 1 X WON THE GAME!");
play =false; }
if (squares[0][0].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][2].getOccupied() &&squares[2][2].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
else if (squares[0][2].getOccupied() == squares[1][1].getOccupied() &&squares[1][1].getOccupied()==squares[2][0].getOccupied() &&squares[2][0].getOccupied() == 2)
{playerlabel.setText("Player 2 O WON THE GAME!");
play =false; }
}//end win
public void setTurn(int t)
turn = t;
playerlabel.setText( "X Player Plays First" );
public void paintComponent( Graphics g )
super.paintComponent( g );
this.setBackground( Color.WHITE );
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
g.setColor( Color.BLACK );
g.drawRect( squares[i][j].getX(), squares[i][j].getY(), 50, 50 );
for (int i=0; i<3; i++){
for (int j=0; j<3; j++){
myplayer[i][j].draw(g);
//End of paintComponent
Edited by: mshadows on May 18, 2008 7:53 AMI was playing with this a little bit and came up with this game model, something that I'm sure can be improved upon greatly:
TttXO.java
an enum to encapsulate X vs O. I could use a boolean here since it has 2 states, but this seems more intuitive to me
package dy08.m05.ttt;
* tic tac toe encapsulation of X vs O
* @author Pete
public enum TttXO
X, O
}TttCell.java
encapsulates an individual cell in the tictactoe grid.
package dy08.m05.ttt;
* Tic Tac Toe Game cell
* can be occupied or not
* can hold TttXO X or O or null
* @author Pete
public class TttCell
private boolean occupied = false;
private TttXO xo = null;
public TttCell()
* sets a Square for either x or o
* @param TttXO
* @return true if successful, false if already occupied
public boolean setXO(TttXO xo)
if (occupied)
return false;
else
occupied = true;
this.xo = xo;
return true;
public void reset()
occupied = false;
xo = null;
public boolean isOccupied()
return occupied;
public TttXO getXO()
return xo;
// used to test and debug the class
public String toString()
if (occupied)
return xo.toString();
else
return "-";
package dy08.m05.ttt;
* Tic Tac Toe game model
* @author Pete
public class TttGameModel
private TttCell[][] cellGrid = new TttCell[3][3];
private boolean xTurn = true;
private boolean win = false;
public TttGameModel()
for (int i = 0; i < cellGrid.length; i++)
for (int j = 0; j < cellGrid.length; j++)
cellGrid[i][j] = new TttCell();
public void reset()
xTurn = true;
win = false;
for (int i = 0; i < cellGrid.length; i++)
for (int j = 0; j < cellGrid[i].length; j++)
cellGrid[i][j].reset();
public boolean isXTurn()
return xTurn;
public boolean isWin()
return win;
* @param row
* @param col
* @return true if valid move, false if game already over or cell occupied
public boolean takeTurn(int col, int row)
TttXO currentXO = TttXO.O;
TttCell cell = cellGrid[row][col];
if (win)
return false;
if (cell.isOccupied())
return false;
if (xTurn)
currentXO = TttXO.X;
cell.setXO(currentXO);
win = checkWin(col, row, currentXO);
xTurn = !xTurn; // toggle xturn
return true;
public boolean checkWin(int col, int row, TttXO xo)
boolean win = false;
// first rows and columns
boolean temp = true;
for (int i = 0; i < 3; i++)
temp &= cellGrid[row][i].getXO() == xo;
win |= temp;
temp = true;
for (int i = 0; i < 3; i++)
temp &= cellGrid[i][col].getXO() == xo;
win |= temp;
if (row == col) // if slash diagonal
temp = true;
for (int i = 0; i < 3; i++)
temp &= cellGrid[i][i].getXO() == xo;
win |= temp;
if (row + col == 2) // if backslash diagonal
temp = true;
for (int i = 0; i < 3; i++)
temp &= cellGrid[i][2 - i].getXO() == xo;
win |= temp;
return win;
// used to test and debug the class
public String toString()
StringBuilder sb = new StringBuilder();
for (int i = 0; i < cellGrid.length; i++)
for (int j = 0; j < cellGrid[i].length; j++)
sb.append(cellGrid[i][j] + " ");
sb.append("\n");
if (win)
sb.append("win! Game over");
else
sb.append("No winner yet");
return sb.toString();
// test the class
public static void main(String[] args)
TttGameModel model = new TttGameModel();
checkMove(model, 0, 0);
checkMove(model, 1, 0);
checkMove(model, 1, 1);
checkMove(model, 2, 0);
checkMove(model, 1, 0); // bad move
checkMove(model, 2, 2);
// to test the class
private static void checkMove(TttGameModel model, int i, int j)
System.out.println("OK move: " + model.takeTurn(i, j));
System.out.println(model + "\n"); -
hi, recently i bought macbook pro with retina display and installed windows 8 professional original software also. but in windows 8 track pad/ TOUCHPAD is not working properly. can you help me with providing drivers for trackpad to work on windows 8 professional .
Did you download and install the Windows Support software? If you did, did you use the Boot Camp Control icon to set up the trackpad how you want it?
http://www.apple.com/support/bootcamp/
https://discussions.apple.com/community/windows_software/boot_camp -
I run Windows 7 Home Premium on an HP Pavilion dv6. I cannot install iTunes or QuickTime. Can you help me with this?
Hello raadabdaun,
Thanks for the question, and welcome to Apple Support Communities.
I understand you are having issues installing iTunes for Windows. The following article provides the most relevant information and troubleshooting steps:
Trouble installing iTunes or QuickTime for Windows
http://support.apple.com/kb/HT1926
Thanks,
Matt M. -
What will i do..there is a message show, "your device in not more eligible to create a free i cloud acount"..and when i try a new one it ask an account number, but i dont have...can you help me with this issue..?
I try also my old icloud user but its not recognizing the accoun...What will i do..there is a message show, "your device in not more eligible to create a free i cloud acount"..and when i try a new one it ask an account number, but i dont have...can you help me with this issue..?
I try also my old icloud user but its not recognizing the accoun...
Maybe you are looking for
-
Transferring info from a Mac with multiple accounts to a Mac with one
Hello - I have to install a new Tiger installation on my wife's iBook. I want to make my life easier, and her entire iBook has been backed up to her account on our shared PowerMac G5. The question I have is this - After I install Tiger on her iBook,
-
Unable to print to pdf from a pdf
We're having a issue where we're unable to print to pdf from a pdf with acrobat 9 std, so far a 64bit machine. We get the following errors "the document could not be printed" "there were no pages selected to print" We see the issue with all pdfs. Acr
-
Access Error Using Webservice In Weblogic 7
Hi, I am getting the following error in Weblogic 7 sp1 when I call a client, which invokes a web service application (A). The application will then connect through the t3 protocol to call another application (B) returning some data. <Dec 17, 2002 4:5
-
I am trying to make a "growing" arrow: A small arrow: -------> would extend to --------------------------------> I tried with shape tweening and shape hints and it works fine. The problem is, if I try to duplicate the layer to use my arrow elsewhere
-
Updating infotype through BADI
I need to update an 'Z'/ custom infotype without using BDC through BADI . How to do this ?