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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T00:11:38+00:00 2026-05-15T00:11:38+00:00

I have a square grid, for a turn based game ( grid is similar

  • 0

I have a square grid, for a turn based game ( grid is similar to the chess board ), but the moves in the games are different based on whether you have lapped your opponent pawn at least once or not.

i.e if you have not lapped (beaten any of the opponents pawns) in the outer most grid as below

alt text http://img17.imageshack.us/img17/4508/squaregrid7x7home.png

if you have lapped your opponent pawn once at least, then you get to reach home,this way.Any player having all his pawns reaching “home” first wins.

alt text http://img249.imageshack.us/img249/318/squaregrid7x7movesimple.png

The ones in yellow are safe-houses, i.e both the opponent pawn and the player’s pawn get to stay in the same grid, this is not considered to be lapping ( the opponent ).The lapped pawn will return to its start point.

Now the question is, what is the effective way to store the paths for the all the pawns.we will have 4 pawns for the player and 4 opponent pawns.

Is there any pattern to store such static information, in a elegant way ?

Thanks for your time

  • 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-15T00:11:39+00:00Added an answer on May 15, 2026 at 12:11 am

    A List should work just fine. It seems pretty elegant to me.

    If there is some overarching need for performance; e.g. you are implementing an automatic player that needs to explore a huge tree of alternative moves, you might consider something else. But the requirements for the data structure will be motivated by your game playing algorithm, and we cannot predict that.

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

Sidebar

Related Questions

If I'm making a simple grid based game, for example, I might have a
I have such a grid square disk. Every grid represents a pixel. My aim
Suppose I have a grid of squared defined like so in a class: Square
I'm writing a board game with a GUI and basically I have a 10x10
I have a grid of squares. Each square is either black or white. The
I have an app that displays the Maidenhead grid square corresponding to that location.
I need help in designing a Chess game. I've already started but haven't got
I currently have a grid made out of square DIVs (200px x 200px each).
I have a game consisting of ships that fly around on a 2d grid.
I have an array of size n^2 representing a square grid of size nxn.

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.