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 4540992
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:09:52+00:00 2026-05-21T15:09:52+00:00

I am new to Android and have learned a lot with this project. I

  • 0

I am new to Android and have learned a lot with this project. I am almost there but, but one of my missing parts is… the game does something like the Simon Says game, and right now I am able to click on the Images and it also loops through them for the user but I can touch them while the loop goes through them. I want now to be able to set like a boolean flag that says userTurn if 0 then it’s user turn and if 1 then its the system. Something of that sort.

What would be the best way to approach this?

  • 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-21T15:09:53+00:00Added an answer on May 21, 2026 at 3:09 pm

    If the various states in which your application can be in is very large and/or complex, I would recommend the state pattern. But if you just need two states, either system or user, I would use something like this:

    private boolean isSystemTurn = false;
    

    and then check it like that:

    if (isSystemTurn) {
       // the user has to wait
    } else {
       // it is user turn
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am a bit new with android but I have some java experience. So
Ok, im fairly new to android but i have managed to teach myself the
i'm new at Android world, and i have a doubt, is there any method
I'm new to Android & Java programming but have been programming in .NET for
i am new to android.i have one single activity with main.xml file. Now, i
I have started a new Android empty project. Where can i find the graphical
i'm a new android developer. I have an application installed in phone. This application
I'm new to android and have been stuck on this problem for a long
I am very new to android.I have set spinner SetOnItemSelected Listener. Is there any
Hello I am new to Android .I have been given an Android project to

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.