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

  • Home
  • SEARCH
  • 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 8513603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:37:13+00:00 2026-06-11T04:37:13+00:00

I am creating a board game with Project RedDwarf framework (old project DarkStar). My

  • 0

I am creating a board game with Project RedDwarf framework (old project DarkStar).

My question is this:

I need to have commands sent back and forth from the server to the client and reverse, and I need a solid programming architecture to incorporate on the command messaging service.

I thought of having a Command interface, and each subcommand would be an implementation of it (which holds the command String).

For instance lets say we need to check if a user is online. We have an interface called Command, then an interface called Check which extends Command, and finally we have the implementation called OnlineCheck.
OnlineCheck could have a method called getCommand and would return the commands String.

Ok till now.. BUT what I really wanna do is, include the possible replies on the same implementation class, so that I can check what the client replied to me, based on one of the pre defined replies.

How should I go about doing 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-06-11T04:37:15+00:00Added an answer on June 11, 2026 at 4:37 am

    Firstly, appreciate the use of command pattern.

    OnlineCheck could have a method called getCommand and would return the commands String.

    Command interface should have an entry point like execute() or run() that would implement what OnlineCheck should do. So there needn’t be any getCommand() that in turn returns the command string which again needs to be interpreted.

    Once you go down this path, the command instance (an instance of OnlineCheck in this case) could hold the response and can be sent back to the client. The client in turn would give this response back to the code block that generated it as it would be the best one to know what type of responses to expect for this command and can interpret them appropriately.

    My two cents!

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

Sidebar

Related Questions

(creating a separate question after comments on this: Javascript redeclared global variable overrides old
I'm creating a board game in AS3 for a Uni project. I was wondering
I'm creating a leader board (a small results table) for a Javascript game i've
I am creating a status board module for my project team. The status board
I'm creating a game using c# and I would like an online highscore board.
I am working on a game that will have a two dimensional board of
I'm creating a simple board game in Java using Swing with an AI that
I am creating an Android board game similar to, for example, Bubble Pop where
I am creating simple chess board game in java, and they are running smoothly,
I'm creating a simple tic tac toe game. I initialized my 3x3 board using

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.