Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6032353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:19:18+00:00 2026-05-23T05:19:18+00:00

I am writing a simple turn-based Android game which allows a player to play

  • 0

I am writing a simple turn-based Android game which allows a player to play against the computer (i.e. phone in this case).

What would be a good/recommended way of letting the game update the computer’s move against the player during the game? One way I could think of is to make the class maintaining the board visible to the computer player (pass the instance to the AI player instance) and update it directly, but this does not seem like a “good” approach. As sometimes it may take time to compute the next move. Also in future if we want to incorporate network play it should not involve a major rewrite to handle an update from the network player.

Any help with this is much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T05:19:19+00:00Added an answer on May 23, 2026 at 5:19 am

    If computations may take a long time then I reccomend looking into AsyncTask you could notify the player that the computer is making its move then pop up a progress dialog which notifies the user that the other player is doing something? Is this sorta what you are looking for? Here are some resources:

    Android Docs: http://developer.android.com/reference/android/os/AsyncTask.html

    Async Template: http://jyro.blogspot.com/2009/11/android-asynctask-template.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking into writing simple graphics code in Android and I've noticed some synchronized()
I am currently writing a simple, timer-based mini app in C# that performs an
I am writing a simple checkers game in Java. When I mouse over the
I'm writing a simple little game for my kids - it doesn't really matter
I'm writing a very simple Java Game. Let me describe it briefly: There are
I'm writing a simple tic tac toe game for school. The assignment is in
I'm writing a simple Java 2D game, displaying a grid. The grid is (for
I'm currently working on a game server for a turn-based persistent world game primarily
I'm planning on writing a multiplayer game with Android as my primary focus as
I'm writing simple program to communicate between smart devices and I receive 11001 when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.